<?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 : Count bookmarks using DAOpenFile</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 : Count bookmarks using DAOpenFile]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 07:41:50 +0000</pubDate>
  <lastBuildDate>Wed, 11 Apr 2012 13:03:07 +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=2221</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[Count bookmarks using DAOpenFile : Hi Jan!If LoadFromFile returns...]]></title>
   <link>http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9459.html#9459</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 2221<br /><strong>Posted:</strong> 11 Apr 12 at 1:03PM<br /><br />Hi Jan!<br><br>If LoadFromFile returns with value 0 you can use <br>LastErrorCode to check where's the real problem:<br>http://www.quickpdflibrary.com/help/quickpdf/LastErrorCode.php<br><br>Cheers, Ingo<br>]]>
   </description>
   <pubDate>Wed, 11 Apr 2012 13:03:07 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9459.html#9459</guid>
  </item> 
  <item>
   <title><![CDATA[Count bookmarks using DAOpenFile : Hi Ingo,I indeed use a loop to...]]></title>
   <link>http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9458.html#9458</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1913">modderkolk</a><br /><strong>Subject:</strong> 2221<br /><strong>Posted:</strong> 11 Apr 12 at 10:42AM<br /><br />Hi Ingo,<div><br></div><div>I indeed use a loop to process a list of PDF files. For each file a call this function:</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; // QuickPDF&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; private string HandlePDF(string filename)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int formaatNr = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Open the file, get a file handle</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int fileHandle = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fileHandle = qp.LoadFromFile(filename, "");</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (fileHandle == 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return filename + ": cannot open file.\r\n";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int aantalPags = qp.PageCount();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (aantalPags == 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qp.RemoveDocument(fileHandle);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return filename + ": filehasn't pages.\r\n";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aantalBMs += qp.OutlineCount();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int p = 0; p &lt; aantalPags; p++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Get a reference to the first page and get the formats</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int pageReference = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double pageWidth = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double pageHeight = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int rotation = 0;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pageReference = qp.SelectPage(p + 1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pageWidth = qp.PageWidth();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pageHeight = qp.PageHeight();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rotation = qp.PageRotation();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rotation == 90 || rotation == 270)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double d = pageWidth;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pageWidth = pageHeight;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pageHeight = d;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double br = pageWidth;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; double hg = pageHeight;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; br = br * 0.3527; &nbsp;// convert from units to mm</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hg = hg * 0.3527;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Close the file</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qp.RemoveDocument(fileHandle);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (Exception ex)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return "";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div></div><div>Is this the correct way, or how can I know that a file is loaded?</div><div><br></div><div>Thanks,</div><div>Evert-Jan</div>]]>
   </description>
   <pubDate>Wed, 11 Apr 2012 10:42:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9458.html#9458</guid>
  </item> 
  <item>
   <title><![CDATA[Count bookmarks using DAOpenFile :  Hi Jan!Could it be that you&amp;#039;re...]]></title>
   <link>http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9457.html#9457</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 2221<br /><strong>Posted:</strong> 11 Apr 12 at 10:15AM<br /><br />Hi Jan!<br><br>Could it be that you're working on a list of files in a loop<br>with LoadFromFile?<br>Perhaps (with very large files) you throw a second filename<br>into LoadFromFile but the first file still isn't completely loaded?<br>Perhaps you should think in this direction...?<br>If you're suggesting a further development of QuickPDF you<br>should enter this Link:<br>http://www.quickpdflibrary.com/support/support-query.php<br><br>Cheers and welcome here,<br>Ingo<br><span style="font-size:10px"><br /><br />Edited by Ingo - 11 Apr 12 at 10:17AM</span>]]>
   </description>
   <pubDate>Wed, 11 Apr 2012 10:15:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9457.html#9457</guid>
  </item> 
  <item>
   <title><![CDATA[Count bookmarks using DAOpenFile : Hi,I use DAOpenFile for getting...]]></title>
   <link>http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9456.html#9456</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1913">modderkolk</a><br /><strong>Subject:</strong> 2221<br /><strong>Posted:</strong> 11 Apr 12 at 9:50AM<br /><br />Hi,<div><br></div><div>I use DAOpenFile for getting the number and format of all pages of the PDF. That works very fine, also with very big files and page formats!<img src="http://www.quickpdf.org/forum/smileys/smiley32.gif" border="0" alt="Clap" title="Clap" /></div><div><br></div><div>But sometimes I need to count the number of the bookmarks (outlines).</div><div><br></div><div>I know that I can use .LoadFromFile and then .PageCount() and .OutlineCount(), but then after loading several files the .LoadFromFile gives fileHandle 0.&nbsp;<img src="http://www.quickpdf.org/forum/smileys/smiley19.gif" border="0" alt="Cry" title="Cry" /></div><div>I use for each document when I am ready .RemoveDocument().</div><div><br></div><div>2 questions:</div><div>1. Is there or will there become a "DA-version" of the OutlineCount() ?</div><div>2. If not, what need I to do to get the OutlineCount() without problems?</div><div><br></div><div>Thanks,</div><div>Evert-Jan</div>]]>
   </description>
   <pubDate>Wed, 11 Apr 2012 09:50:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/count-bookmarks-using-daopenfile_topic2221_post9456.html#9456</guid>
  </item> 
 </channel>
</rss>