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.