In This Topic
Programming / Document Loading & Saving / Loading PDF documents

Loading PDF documents

In This Topic

PDF creation and loading in GdPicture.NET is governed by the GdPicturePDF class. This class is responsible for almost all the PDF features that GdPicture.NET has to offer.
Say you have a PDF file on your disk, here is what you have to do to load it:

Copy Code
Dim oGdPicturePDF As New GdPicturePDF()

Dim status As GdPictureStatus = oGdPicturePDF.LoadFromFile("MyPDF.pdf", False)

If status <> GdPictureStatus.OK Then

   MessageBox.Show("The file can't be loaded. Error: " + status.ToString(), "Loading PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Error)

   Return

End If
Copy Code
GdPicturePDF oGdPicturePDF = new GdPicturePDF();

GdPictureStatus status = oGdPicturePDF.LoadFromFile("MyPDF.pdf", false);

if (status != GdPictureStatus.OK)

{

    MessageBox.Show("The file can't be loaded. Error: " + status.ToString(), "Loading PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Error);

    return;

}

Now you have a GdPicturePDF instance with your file, you can manipulate it, draw on it, merge it with other files, search it, annotate it, save it and much more.