flutter_pdf_render icon indicating copy to clipboard operation
flutter_pdf_render copied to clipboard

Feature request: controller on PdfDocumentLoader class

Open lcyper opened this issue 3 years ago • 4 comments

please add controller parametter on PdfDocumentLoader like: PdfDocumentLoader.openAsset( 'assets/hello.pdf', pageNumber: 1, viewerController: widget.pdfController, // <- add pageBuilder: (context, textureBuilder, pageSize) => textureBuilder(), )

lcyper avatar Jan 19 '22 18:01 lcyper

@lcyper Currently, PdfDocumentLoader does not have controller. Only PdfViewer has it.

espresso3389 avatar Jan 19 '22 18:01 espresso3389

because that i put: "Feature request" thanks for creating and sharing this package!

lcyper avatar Jan 19 '22 23:01 lcyper

OK, then, what is your purpose for the controller? PdfDocumentLoader is all-purpose widget and normally you can controll anything without such controller.

espresso3389 avatar Jan 20 '22 00:01 espresso3389

first of all thank you for your response.

  1. I want to be able to zoom in the page (like the other class does using interactiveViewer) (so I can also implement the doubleTap).
  2. i want to know which page i'm on.
  3. I want to be able to go to a specific page.

this class has a much higher sheet load than the other class, so I want to see if I can use this class.

I also want to be able to implement widgets above and below the pdf, it also happens to me that with the setState the pdf (widget) is redrawn and flashes.

If it is possible to add the controller or show me how to do it, thank you.

I have tried to do it with the interactiveViewer widget but when I zoom the pan is blocked because the object goes out of the screen, I have tried several things but without success, I also tried several packages and yours was the one I liked the most.

Thanks again, I look forward to hearing from you.

lcyper avatar Jan 25 '22 17:01 lcyper