pdf viewer widget isn't working

  here's my code for creating a custom flutterflow widget but it doesn't show any pdf it compiles correctly any clue Image_4901_1719852906069 Image_9633_1719850694678


3 Replies

IP ImmanKumarP Palanikumar Syncfusion Team July 2, 2024 06:15 AM UTC

Hi Salil Harit,

To use a Custom widget (like syncfusion_flutter_pdfviewer) in FlutterFlow, the package must be supported on the Web platform.

Reference:  https://docs.flutterflow.io/customizing-your-app/custom-functions/custom-widgets

For the syncfusion_flutter_pdfviewer package to work properly on the Web platform, we need to add the pdf.js script reference in the web/index.html file.
Reference: https://pub.dev/packages/syncfusion_flutter_pdfviewer#web-integration

However, in FlutterFlow, we cannot add JavaScript references in the index.html file. We have raised a query in the FlutterFlow Community to find a solution for this issue.
Query: https://community.flutterflow.io/ask-the-community/post/add-scripts-in-index-html-c6eFOTqd6ncbQJo


Based on the response from a community member, we conclude that it is not possible to add JavaScript references in FlutterFlow.

Therefore, despite being supported on the Web platform, syncfusion_flutter_pdfviewer is not supported in FlutterFlow due to this limitation.


Please feel free to contact us if you require any further assistance.

Regards,

Imman Kumar P



SH Salil Harit replied to ImmanKumarP Palanikumar July 2, 2024 09:32 AM UTC

i recall blupry making use of syncfusion to make it available for flutterflow how is that possible ?




IP ImmanKumarP Palanikumar Syncfusion Team July 3, 2024 11:06 AM UTC

Hi Salil Harit,


The syncfusion_flutter_pdfviewer widget does not display a preview on the FlutterFlow website due to the limitations mentioned in our previous update. However, you can download the code from FlutterFlow, add the required script to the index.html file, and then run the application locally or host it on a website. This approach allows the use of the SfPdfViewer widget with FlutterFlow, although a preview is not available directly on FlutterFlow.

Regards,

Imman Kumar P


Loader.
Up arrow icon