We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

onDocumentLoaded in SfPdfViewer returns too early

Hi! I observed that onDocumentLoaded fires in advance. Whenever my setState executes, there's still a loading progress bar shown for a few milliseconds before the actual PDF file. Here is a snippet of my code:

                            child: SfPdfViewer.network(
                              'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf',
                              onDocumentLoaded: (_) {
                                setState(() {
                                  isLoading = false;
                                });
                              },
                            ),



If there's a way around this, replies are appreciated. Thanks!


4 Replies

DR Deepika Ravi Syncfusion Team April 17, 2023 06:19 PM UTC

Hi MAE KRISTINE VANNIRRIE SARMIENTO,


We are the checking on the reported issue and will update the further details on April 19, 2023.


Regards,

Deepika R



DR Deepika Ravi Syncfusion Team April 19, 2023 05:10 PM UTC

Hi MAE KRISTINE VANNIRRIE SARMIENTO,


Sorry for the inconvenience. We are the still validating the reported issue and will update the further details on April 24, 2023.


Regards,

Deepika R



DR Deepika Ravi Syncfusion Team April 24, 2023 02:09 PM UTC

Hi MAE KRISTINE VANNIRRIE SARMIENTO,


We have confirmed that the issue “The onDocumentLoaded callback is executed before the PDF document loads in the SfPdfViewer” is a defect and logged a defect report for this issue. The fix for the same will be included in our 2023 May 9th weekly NuGet release. Kindly use the following feedback link for track the status of the issue,

https://www.syncfusion.com/feedback/25265/support-for-pdf-form


Regards,

Deepika R



DR Deepika Ravi Syncfusion Team May 9, 2023 04:46 PM UTC

Hi MAE KRISTINE VANNIRRIE SARMIENTO, The issue " The onDocumentLoaded callback is executed before the PDF document loads in the SfPdfViewer" has been resolved and the fix is available in the latest weekly (v21.2.4) release. Please find the link below,

https://pub.dev/packages/syncfusion_flutter_pdfviewer/versions/21.2.4


Loader.
Live Chat Icon For mobile
Up arrow icon