<?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 : Change PageSize Midway?</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 : Change PageSize Midway?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 20 May 2026 05:54:46 +0000</pubDate>
  <lastBuildDate>Thu, 05 Aug 2010 16:15:52 +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=1528</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[Change PageSize Midway? : For future readers I figured out...]]></title>
   <link>http://www.quickpdf.org/forum/change-pagesize-midway_topic1528_post6791.html#6791</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=872">waynefulcher</a><br /><strong>Subject:</strong> 1528<br /><strong>Posted:</strong> 05 Aug 10 at 4:15PM<br /><br /><DIV>For future readers I figured out how to change the pagesize after drawing to a page has already occured and be able to keep the data. Now if you switch from legal down to letter then obviously what was draw below the bottom&nbsp; of a letter size page will get cut off. But switching from Letter to Legal appears to work just fine.</DIV><DIV>&nbsp;</DIV><DIV>procedure ChangePageSize(PDF: TQuickPDF0719; NewPageSize: String) ;<BR>var<BR>&nbsp; i, pc: Integer ;<BR>&nbsp; aCapPageID: array of Integer ;<BR>&nbsp; OrigPageWidth: Double ;<BR>&nbsp; OrigPageHeight: Double ;<BR>begin<BR>&nbsp; pc := PDF.PageCount ;<BR>&nbsp; OrigPageWidth := PDF.PageWidth ;<BR>&nbsp; OrigPageHeight := PDF.PageHeight ;<BR>&nbsp; SetLength(aCapPageID, pc) ;<BR>&nbsp; for i := 1 to pc do begin<BR>&nbsp;&nbsp;&nbsp; PDF.NewPage ;<BR>&nbsp;&nbsp;&nbsp; aCapPageID&#091;i-1&#093; := PDF.CapturePage(1) ;<BR>&nbsp; end ;</DIV><P>&nbsp; PDF.SetOrigin(1) ; // Top-Left<BR>&nbsp; PDF.SetPageSize(NewPageSize) ;</P><P>&nbsp; for i := 1 to pc do begin<BR>&nbsp;&nbsp;&nbsp; PDF.SelectPage(i) ;<BR>&nbsp;&nbsp;&nbsp; PDF.DrawCapturedPage(aCapPageID&#091;i-1&#093;, 0, 0, OrigPageWidth, OrigPageHeight) ;<BR>&nbsp; end ;<BR>end ;<BR></P>]]>
   </description>
   <pubDate>Thu, 05 Aug 2010 16:15:52 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/change-pagesize-midway_topic1528_post6791.html#6791</guid>
  </item> 
  <item>
   <title><![CDATA[Change PageSize Midway? : I have some data that will be...]]></title>
   <link>http://www.quickpdf.org/forum/change-pagesize-midway_topic1528_post6787.html#6787</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=872">waynefulcher</a><br /><strong>Subject:</strong> 1528<br /><strong>Posted:</strong> 04 Aug 10 at 10:33PM<br /><br />I have some data that will be passed to my function which will generate a PDF. The problem is I have no way "ahead of time" to know if this data will fit on letter or require legal.<DIV>The idea here is I need the document to be on letter if it will all fit and if not switch to legal as a preference to having 2 letter pages.</DIV><DIV>It will be a tremendous amount of work to "preprocess" the entire document with all the data being passed in to calculate the total height of all the data since there are many different headings which use different fonts and text sizes. Also I tried initializing my page size to letter and then draw the text to the page until I&nbsp;could see that the text would not fit then I tried to just switch the pagesize to legal mid-stream. That did not work as all the text drawn before switching the page size seemed to be centered vertically on the legal page. I also tried initializing it to legal, drawing my text and when done if it used less than was needed for letter then I switched the page size to letter but then about half the text was off the top of the page. Does anyone know if this can be done reliably or do I just have to process all the data twice, once for the math of it to decide the total height and then once to actually print?</DIV><DIV>Thanks for your help.</DIV>]]>
   </description>
   <pubDate>Wed, 04 Aug 2010 22:33:06 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/change-pagesize-midway_topic1528_post6787.html#6787</guid>
  </item> 
 </channel>
</rss>