Welcome Guest Search | Active Topics | Sign In | Register

PDF viewer - Condition to have IsReady = true Options
FG
Posted: Wednesday, January 15, 2020 3:45:57 AM
Rank: Newbie
Groups: Member

Joined: 12/6/2018
Posts: 6
Hi

I'd like to know which are the conditions to have the property IsReady == true for the control PdfViewer ?
I can't succeed to display a pdf in a form because it seems to never be loaded
I have the following error :
Either the underlying WebView is not ready, or a PDF file is not loaded.

I think that my pdf is correctly loaded.

I tried the 2 overloaded methods Load :
public Base.WaitableTask Load(string url);
public Base.WaitableTask Load(byte[] pdfData, string fileName = null);


I checked the url for the 1st Load method, and the pdfData array for the 2nd Load method but the result is the same.

Thanks a lot for your support.
eo_support
Posted: Wednesday, January 15, 2020 10:00:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

The WebView will be ready once it finishes initializing. You can handle the PdfViewer's IsReadyChanged event and only load the file after this event is fired and IsReady is true. If this event is never fired or IsReady never changes to true, then there is a problem somewhere else and that must be resolved first.

We also have a new build that will be posted today that would allow you to call Load before IsReady changes to true. So you may wish to try that build once it is posted.

Thanks!
FG
Posted: Wednesday, January 15, 2020 10:13:51 AM
Rank: Newbie
Groups: Member

Joined: 12/6/2018
Posts: 6
Thanks a lot for your quick answer.
The problem was probably somewhere else.
I tried several things and then restart my VS and now it's ok the pdf is correctly displayed.

Sorry for the question on my issue which was not linked to your product apparently.
eo_support
Posted: Wednesday, January 15, 2020 2:20:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Great. Glad to hear that you got it working!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.