Code Samples - Document Converter Pro

Example 16: Extract a page from an existing PDF file - PHP Copy 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
   <?php

     $pageToExtract=2;

     $DC = New COM("Neevia.docConverter");

     $RVal = $DC->extractPDFpages("c:\\users\\public\\test.pdf", "c:\\users\\public\\page.pdf", $pageToExtract, $pageToExtract);

     if ($RVal != 0) {
       echo "There was an error extracting the page !!!";
     }else{
       echo "Done !!!";
     }

   ?>