flutter_pdf_render icon indicating copy to clipboard operation
flutter_pdf_render copied to clipboard

Add a way to select and copy text

Open cbenhagen opened this issue 2 years ago • 5 comments

It would be great if it would be possible to select and copy text from a pdf.

cbenhagen avatar Sep 24 '22 18:09 cbenhagen

On iOS, the plugin uses CGPDF* low level classes in conjonction with Flutters Texture, I don't know if it's even possible to mimic copying with Texture... Maybe @espresso3389 can answer

dupuchba avatar Oct 04 '22 14:10 dupuchba

There're two major tasks for the issue:

  • Actual text extraction from PDF page
    • Android's PdfRenderer.Page lacks support for such non-rendering operation; we should use another library like pdfium
    • For iOS/macOS and Web, their engine is enough to implement it
  • Text selection interaction
    • Just googling the things, I've found SelectableRegion class and it seems to be a perfect fit for the purpsose

So there seems only one blocker for the issue.

espresso3389 avatar Oct 04 '22 15:10 espresso3389

JUST A NOTE: #65 is a Flutter Web topic that tries to implement text extraction by own method

espresso3389 avatar Oct 04 '22 15:10 espresso3389

any solution to this ?

Aruljebaraj avatar Nov 01 '23 05:11 Aruljebaraj

is there any way to achieve this

Aruljebaraj avatar Nov 14 '23 05:11 Aruljebaraj