Logo
My Account |  Site Map | Contact Us  
 The same content in Microsoft HTML help file format is included in the download package.
Loading PDF File

You can use PdfDocument to load an existing PDF file. Once it is loaded, you can use any API that works with PdfDocument to perform many other tasks such as modifying, merging, splitting, saving, etc.

To load a PDF file, simply pass the file name when you create a PdfDocument object, for example:

//Load a PDF file with the given file name
PdfDocument doc = new PdfDocument(pdf_file_name);

Alternatively, you can also load a PDF file from a System.IO.Stream object, for example:

//Load PDF file from a stream
PdfDocument doc = new PdfDocument(stream);

Once the file is loaded into a PdfDocument, it is no different than any other PdfDocument object created by other means. You can use any API avaliable to a PdfDocument object on the loaded document.


Direct link to this topic