flutter_full_pdf_viewer
flutter_full_pdf_viewer copied to clipboard
[Feature Request] WEB SUPPORT!
It seems that flutter_full_pdf_viewer is not web compatible yet? Congratulations and much thanks for your great solution!
Please inform us about your plans on web support. Thank you so much for the great plugin.
I'd also love to see it working on web. Any plans for that @albo1337 ?
Currently I am using the url_launcher package for web.
if (kIsWeb) {
...url_launcher...
} else {
...pdf_viewer....
}
Currently I am using the url_launcher package for web.
if (kIsWeb) { ...url_launcher... } else { ...pdf_viewer.... }
So does that mean the plugin doesn't break building for the web? Thats great to hear!
So does that mean the plugin doesn't break building for the web? Thats great to hear!
No, it doesn't! Thanks to @albo1337 very much!
One thing that could help to make this truly web compatible is to allow PDFViewerScaffold to accept something other than a path to a file. For example, I'm using the pdf package (https://pub.dev/packages/pdf) to generate a pdf, and I'd like to be able to show it with flutter_full_pdf_viewer. If I could directly use the Uint8List data generated by pdf package (instead of a String filepath), that would bypass the "create file" step needed by flutter_full_pdf_viewer, and I could just store the result of the pdf generation in Provider until it can be displayed.
@wterrill this is exactly what I meant. It's fine that it accepts urls, but if you're the one that generates the PDF file and you want to display it right away, you don't want to upload it somewhere to just display it.
We'd love to see the possibility to open the mentioned Uint8List type directly
Perhaps this code might be of use? I posted a stackoverflow question about this, and user Spatz responded with code that uses html pdf display methods to show the document directly from the Uint8List data. It's brilliant. Here's the link: https://stackoverflow.com/questions/61373742/flutter-web-display-pdf-file-generated-in-application-uint8list-format/61395912#61395912