<?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 : SetPageDimensi&#111;ns Problem</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 : SetPageDimensi&#111;ns Problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 03:40:29 +0000</pubDate>
  <lastBuildDate>Wed, 16 Nov 2005 01:22:25 +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=180</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[SetPageDimensi&#111;ns Problem : Me again ;-)  Here&amp;#039;s some...]]></title>
   <link>http://www.quickpdf.org/forum/setpagedimensions-problem_topic180_post525.html#525</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 180<br /><strong>Posted:</strong> 16 Nov 05 at 1:22AM<br /><br />Me again ;-)<br /><br />Here's some code from the "original" QuickPDF-website. It seems to feed your needs?<br /><br />First, load the original document:<br />QP.LoadFromFile("original.pdf")<br /><br />It will be easier if we set the origin to the top-left corner of the page, use the SetOrigin function:<br />QP.SetOrigin(1)<br /><br />Then we get the number of pages in the original document:<br />originalPageCount = QP.PageCount()<br /><br />Now calculate the required number of pages for the booklet:<br />if (originalPageCount == 1) requiredPages = 1; else<br /> requiredPages = (floor(originalPageCount - 1) / 4) * 2<br /><br />Store the size of the pages in the original document:<br />w = QP.PageWidth()<br />h = QP.PageHeight()<br /><br />Add the required number of pages to the end of the document, using the NewPages function:<br />QP.NewPages(requiredPages)<br /><br />Now capture the original pages:<br />for (page = 1; page &lt;= originalPageCount; page++) {<br /> capture&#091;page&#093; = QP.CapturePage(1)<br />}<br /><br />Draw the first set of pages, alternate right/left:<br />captureIndex = 1<br />drawLeft = false<br />for (page = 1; page &lt;= requiredPages; page++) {<br /> QP.SelectPage(page)<br /> QP.SetPageDimensions(h, w)<br /> if (drawLeft) x = 0; else x = h / 2<br /> QP.DrawCapturedPage(capture&#091;captureIndex&#093;, x, 0, h / 2, w)<br /> captureIndex++<br /> drawLeft = !drawLeft<br />}<br /><br />Draw the remaining pages, alternate left/right:<br />for (page = requiredPages;<br />&nbsp;&nbsp;&nbsp;(page &gt;= 1) && (captureIndex &lt;= originalPageCount);<br />&nbsp;&nbsp;&nbsp;page--) {<br /> QP.SelectPage(page)<br /> if (drawLeft) x = 0; else x = h / 2<br /> QP.DrawCapturedPage(capture&#091;captureIndex&#093;, x, 0, h / 2, w)<br /> captureIndex++<br /> drawLeft = !drawLeft<br />}<br /><br />Now save the booklet you have just created to a file:<br />QP.SaveToFile("booklet.pdf") <br />]]>
   </description>
   <pubDate>Wed, 16 Nov 2005 01:22:25 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setpagedimensions-problem_topic180_post525.html#525</guid>
  </item> 
  <item>
   <title><![CDATA[SetPageDimensi&#111;ns Problem : Hi Martin! I didn&amp;#039;t try it...]]></title>
   <link>http://www.quickpdf.org/forum/setpagedimensions-problem_topic180_post524.html#524</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 180<br /><strong>Posted:</strong> 16 Nov 05 at 1:18AM<br /><br />Hi Martin!<br />I didn't try it out but ...<br />What about creating a new and empty page with the new dimensions and then copy the old page into the new page?<br />Perhaps it helps working additional with GetPageContent on the old page and SetPageContent on the new page (after resizing).<br />Good luck.]]>
   </description>
   <pubDate>Wed, 16 Nov 2005 01:18:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setpagedimensions-problem_topic180_post524.html#524</guid>
  </item> 
  <item>
   <title><![CDATA[SetPageDimensi&#111;ns Problem : I am trying to change the dimensions...]]></title>
   <link>http://www.quickpdf.org/forum/setpagedimensions-problem_topic180_post523.html#523</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=132">Martin</a><br /><strong>Subject:</strong> 180<br /><strong>Posted:</strong> 15 Nov 05 at 8:29PM<br /><br /><P>I am trying to change the dimensions of an existing page and the result is that the page gets resized but all of the content that was previously on the is removed.&nbsp; Is this the&nbsp; proper result of the method or is there another way to resize an existing page.</P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 15 Nov 2005 20:29:56 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/setpagedimensions-problem_topic180_post523.html#523</guid>
  </item> 
 </channel>
</rss>