<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : ExtractPages</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : ExtractPages]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 13 Jul 2026 12:24:07 +0000</pubDate>
  <lastBuildDate>Thu, 22 Dec 2005 23:02:47 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=220</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[ExtractPages : I used the ExtractPages for nearly...]]></title>
   <link>http://www.quickpdf.org/forum/extractpages_topic220_post756.html#756</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1">Michel_K17</a><br /><strong>Subject:</strong> 220<br /><strong>Posted:</strong> 22 Dec 05 at 11:02PM<br /><br />I used the ExtractPages for nearly 2 years without any problems. I think you are correct: the documentation is wrong. Here is my code but note that I use "SelectedDocument" to get the Doc ID.<br /><br />Private Function PDF_Extract_Page(InFile As String, OutFile As String, page As String) As Long<br />&nbsp;&nbsp;&nbsp;&nbsp;Dim hDoc1Page As Long<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;' Trap Errors<br />&nbsp;&nbsp;&nbsp;&nbsp;On Error GoTo Error_Handler<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;' Get rid of ".pdf"<br />&nbsp;&nbsp;&nbsp;&nbsp;If Len(OutFile) &gt; 4 Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OutFile = Left$(OutFile, Len(OutFile) - 4) & "_"<br />&nbsp;&nbsp;&nbsp;&nbsp;Else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Function<br />&nbsp;&nbsp;&nbsp;&nbsp;End If<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;' Create a new single page document<br />&nbsp;&nbsp;&nbsp;&nbsp;rtn = oPDF.SelectDocument(hDoc)<br />&nbsp;&nbsp;&nbsp;&nbsp;hDoc1Page = oPDF.ExtractPages(Val(page), 1)<br />&nbsp;&nbsp;&nbsp;&nbsp;hDoc1Page = oPDF.SelectedDocument()<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;' Save it<br />&nbsp;&nbsp;&nbsp;&nbsp;rtn = oPDF.SaveToFile(OutFile & Format$(Val(page), "0000") & PDF)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;' Get rid of single page doc<br />&nbsp;&nbsp;&nbsp;&nbsp;rtn = oPDF.RemoveDocument(hDoc1Page)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;' Job Complete<br />&nbsp;&nbsp;&nbsp;&nbsp;PDF_Extract_Page = True<br />&nbsp;&nbsp;&nbsp;&nbsp;Exit Function<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />Error_Handler:<br />&nbsp;&nbsp;&nbsp;&nbsp;olog.LogError False, Err.Number, Err.Description, Err.LastDllError, "PDF_Extract_Page"<br />End Function<br /><span style="font-size:10px"><br /><br />Edited by Michel_K17</span>]]>
   </description>
   <pubDate>Thu, 22 Dec 2005 23:02:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/extractpages_topic220_post756.html#756</guid>
  </item> 
  <item>
   <title><![CDATA[ExtractPages : Haven&amp;#039;t tested it, and the...]]></title>
   <link>http://www.quickpdf.org/forum/extractpages_topic220_post753.html#753</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=115">chicks</a><br /><strong>Subject:</strong> 220<br /><strong>Posted:</strong> 22 Dec 05 at 6:32PM<br /><br />Haven't tested it, and the doc does say that SelectDocument() returns an ID, but maybe it's returning the doc's index instead?  Put some debug code in to print out exactly what it's returning.  If it's 1 or 2 or 3, it's the index, and you'll need to use DocumentID() to get the actual ID, which is usually a multi-digit number.<br />]]>
   </description>
   <pubDate>Thu, 22 Dec 2005 18:32:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/extractpages_topic220_post753.html#753</guid>
  </item> 
  <item>
   <title><![CDATA[ExtractPages : Do I need to merge the extracted...]]></title>
   <link>http://www.quickpdf.org/forum/extractpages_topic220_post749.html#749</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=182">GreatPyr</a><br /><strong>Subject:</strong> 220<br /><strong>Posted:</strong> 22 Dec 05 at 5:39PM<br /><br />Do I need to merge the extracted pages?  If I take the last two lines off the code, it seems to work.  Somehow the extracted pages find their way to lngDoc1, even though it's not the selected document.  I'm just not comfortable with it until I know why it's working.<br /><br />I wish there was some documentation for this stuff.<span style="font-size:10px"><br /><br />Edited by GreatPyr</span>]]>
   </description>
   <pubDate>Thu, 22 Dec 2005 17:39:38 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/extractpages_topic220_post749.html#749</guid>
  </item> 
  <item>
   <title><![CDATA[ExtractPages : Everytime I execute the VB code...]]></title>
   <link>http://www.quickpdf.org/forum/extractpages_topic220_post747.html#747</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=182">GreatPyr</a><br /><strong>Subject:</strong> 220<br /><strong>Posted:</strong> 22 Dec 05 at 4:54PM<br /><br />Everytime I execute the VB code below, ExtractPages always returns 1 in lngDoc2.  The documentation said it would return the ID of the new document containing the extracted pages.  Any ideas what I'm doing wrong?<br /><br />Thanks.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WorkingPDF.LoadFromFile ("MainDoc.pdf")<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngDoc1 = WorkingPDF.SelectedDocument<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WorkingPDF.LoadFromFile ("IA-004405.pdf")<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngDoc3 = WorkingPDF.SelectedDocument<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngDoc2 = WorkingPDF.ExtractPages(1, 4)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WorkingPDF.SelectDocument (lngDoc1)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WorkingPDF.MergeDocument (lngDoc2)<br />]]>
   </description>
   <pubDate>Thu, 22 Dec 2005 16:54:53 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/extractpages_topic220_post747.html#747</guid>
  </item> 
 </channel>
</rss>