PdfView is not working with our EMS protocol PDF files
Closed this issue · 3 comments
When I run the app and choose a protocol, it opens the PdfScreen (ours) containing a PdfView (third party) but it just has the text "RENDER_ERROR" and sometimes it throws an exception for unsupported platform. This is strange because if I hardcode the document "assets/flutter_tutorial.pdf" and open it in the PdfScreen, I see the entire PDF document for the flutter tutorial.
I've also found that when I export the flutter tutorial PDF using Adobe Acrobat Pro, Preview, or Google Chrome, that PDF gives the same RENDER_ERROR / unsupported platform as the protocols. Maybe it's because I'm on macOS and it's generate incompatible PDF files?
I recommend trying to open the protocols on Windows or Android and let me know if you have any errors.
@ishaaraghav can you see if you can make any PDFs work with this PDF viewer I've made? It might be macOS causing my PDFs to be "incompatible" with the plugin we're using. I'll keep experimenting to see what kind of PDFs are to be expected by the plugin.
Update: found out that I can export functional PDF files, but I have to use a word processor. So I'm going to convert the PDF to Microsoft Word and then export each page individually to PDF. Hopefully this works.
I determined that the issue with the protocol PDF is that it uses flowcharts and nested tables. I think that is hard for simpler PDF processors like our plugin, so I'm going to export the whole protocol pdf as images and just use an image viewer, instead. Not a big change, it actually makes things a lot easier as we can better control how these protocols appear and how they're compressed.