Load PDF document on GdViewer

Example requests & Code samples for GdPicture Toolkits.
Post Reply
ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Load PDF document on GdViewer

Post by ejbrandino » Tue Sep 27, 2016 6:25 am

Hi,

I wanted to load my PDF file to the GdViewer and I searched on your online documentation and I got this

GdPicturePDF oGdPicturePDF = new GdPicturePDF();
GdPictureStatus status = oGdPicturePDF.LoadFromFile("MyPDF.pdf", false);
if (status != GdPictureStatus.OK)
{
MessageBox.Show("Error opening the PDF", "Error " + status.ToString());
return;
}

but it seems that it's not working..what am I missing?

Any help would be greatly appreciated.

Here's the link of my sample app for you to understand it better.

https://drive.google.com/file/d/0B1tWyB ... sp=sharing

Thank you.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Load PDF document on GdViewer

Post by Loïc » Tue Sep 27, 2016 8:58 am

Hi,

You are not displaying the loaded document. For that you can add this line at the end of your snippet:

Code: Select all

gdViewer1.DisplayFromGdPicturePDF(oGdPicturePDF);
Kind regards,

Loïc

ejbrandino
Posts: 38
Joined: Thu Sep 22, 2016 4:56 am

Re: Load PDF document on GdViewer

Post by ejbrandino » Tue Sep 27, 2016 10:04 pm

Works like a charm.. Thank you very much...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest