packages.flutter
packages.flutter copied to clipboard
[native_pdf_render] Windows throws PlatformException
I'm getting this exception when trying to view pdf file: "PlatformException(native_pdf_exception, Document failed to open, null, null)"
I'm getting the same error and a similar one on macOS. It's running perfectly fine on web though. I think there is a null check (!) somewhere that when the pdf controller gets initialised if that helps.
We had the same error and instead of
PdfDocument.openFile(widget.file.path)
we solved using
PdfDocument.openData(widget.file.readAsBytesSync())
We had the same error and instead of
PdfDocument.openFile(widget.file.path)
we solved using
PdfDocument.openData(widget.file.readAsBytesSync())
This works for me. Thanks!