Wednesday, 4 September 2013

How to detect if AxAcroPdf component has loaded PDF?

How to detect if AxAcroPdf component has loaded PDF?

I have an AxAcroPdf component in my C#.Net application which loads a pdf
from a url:
pdfViewer.src = previewUrl;
When there is nothing at that URL the component hangs. I have tried adding
a timer which checks a boolean value which is updated after the pdf is
loaded, but the AxAcroPdf component loads from a URL in a background
thread which is inaccessible to me, so this approach does not work.
As far as I can tell the component does not provide any methods for
checking on the progress of getting a pdf from a URL.
My final option is to download the pdf separately, then use the loadFile
method instead, but I would prefer to avoid doing this if possible because
the information contained in the pdf is sensitive so I would prefer not to
be putting a copy of the pdf on my users PCs.
Any ideas?

No comments:

Post a Comment