 |
Example 3: Extract several pages from a PDF file (VC#) |
|
 |
|
 |
Note: Add a reference in your project to PDFmergeNET
To do this:
a. On the Project menu, click Add Reference;
b. On the .NET tab, locate PDFmergeNET and then click Select;
c. Click OK in the Add References dialog box to accept your selections.
|
|
PDFsplit.Neevia NVsplit = new PDFsplit.Neevia();
int retVal;
// Extract pages 2,3,7
retVal = NVsplit.SplitPDF(@"c:\1.pdf(2,3,7)", @"c:\out\");
if (retVal != 0)
{
MessageBox.Show("Error code = " + retVal.ToString());
}
else
{
MessageBox.Show("Done");
}
|
|
 |
|