C1PdfDocumentSource is Busy

Posted by: lhampton on 24 December 2018, 10:35 am EST

    • Post Options:
    • Link

    Posted 24 December 2018, 10:35 am EST

    We have an “image” viewer that uses the FlexViewer and C1PdfDocumentSource as needed. (Version 4.0.20181.296) When needed, it creates a flex viewer and a Pdf source, adds the viewer to the form’s controls, sets the viewer’s bounds on the form, then uses the PdfSource’s LoadFromFile method to display the PDF.

    For the first pdf (and apparently, only the first pdf) the PdfSource:

    • raises its BusyStateChanged event (busy = true)
    • an exception is thrown (debug window: Exception thrown: ‘System Exception’ in * C1.Win.C1Document.4.dll"))
    • throws an exception within the local method that called LoadfromFile: “The C1PdfDocumentSource is busy”
    • raises its BusyStateChanged event (busy = false)

    and the pdf is never displayed. If I select a different PDF, it is displayed after a short delay; switch to the first pdf and it is displayed after a delay of several seconds. All of the documents have been moved to the local temp folder before being assigned to the viewer, so the delay is not a network delay.

    I was able to create a work-around by setting a “display it later” flag and, when the BusyStateChanged was raised with IsBusy False, ask it again to load the file, which worked.

    The exception occurs for any first pdf after the viewer is instantiated.

    The delay that I mentioned above seems to be due to the PDF containing an image. A regular PDF is displayed after a sub-second but noticeable delay, but the one with an embedded image takes several seconds to display.

    We are compiling for dot-net version 4.6.1, x86, on a Windows-7 development machine.

  • Posted 26 December 2018, 4:36 am EST

    Hello,

    I tried to replicate the issue at our end but could not observe the said exception. The attached application did take some time before loading the pdf for the first time but that is natural and varies depending upon the size of the file loaded.

    Please try the attached application at your end with the latest 2018 V3 builds. In case the exception is still observed, kindly share a video showing the issue at your end along with the steps to observe the exception. If it works fine, share your sample application with the steps.

    This will help me assist you further.

    Best Regards,

    Eshaprj_PDFinFlexViewer.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels