<?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 : PDFs rotate unexpectedly</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 : PDFs rotate unexpectedly]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 09 Aug 2026 07:31:49 +0000</pubDate>
  <lastBuildDate>Wed, 22 Feb 2012 14:58: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=2159</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[PDFs rotate unexpectedly : We have just found a bug with...]]></title>
   <link>http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9204.html#9204</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2159<br /><strong>Posted:</strong> 22 Feb 12 at 2:58PM<br /><br />We have just found a bug with NormalizePage(0); &nbsp;This has been fixed in the 8.14 beta 5 just released yesterday. &nbsp;It can be download from here.<div><br></div><div>&nbsp; http://www.quickpdflibrary.com/blog/2012/02/quick-pdf-library-8-14-beta-5-released/<br><div><br></div><div>As a work around is to call QP.SetOrigin(0) before calling QP.NormalizePage(0);</div></div><div><br></div><div>&nbsp; QP.SetOrigin(0);</div><div>&nbsp; QP.NormalizePage(0);</div><div>&nbsp; QP.SetOrigin(1);</div><div><br></div><div>Andrew.</div>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 14:58:52 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9204.html#9204</guid>
  </item> 
  <item>
   <title><![CDATA[PDFs rotate unexpectedly :  Thanks Werner for your code...]]></title>
   <link>http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9169.html#9169</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1861">chansw</a><br /><strong>Subject:</strong> 2159<br /><strong>Posted:</strong> 18 Feb 12 at 3:20AM<br /><br />Thanks Werner for your code sample that show how to use the PageRotation() and RotatePage() functions. For whatever reason however I had to apply the rotation AFTER the new page was drawn; the resulting page did NOT rotate when I placed the RotatePage() command as in your sample code.<br><br>Anyways, here's the code that worked for me. I added some subtle hacks (having to do with single vs multiple-page original files). I've added comments to explain when to execute NewPage() based on what I observed through trial-and-error, hopefully I got them right. Being a newb at QPL, I wish the official documentation (reference manuals, etc.) were a bit more comprehensive explaining the subtleties of how things actually work.<br><br>Jerry<br><br>--<br><br>QP.LoadFromFile(origfile, "")<br>QP.SetOrigin(1)<br><br>Dim numpages As Integer = QP.PageCount<br>For i As Integer = 1 To numpages<br>&nbsp;&nbsp; QP.SelectPage(1)<br>&nbsp;&nbsp; Dim rotation As Integer = QP.PageRotation()<br>&nbsp;&nbsp; pagewidth = QP.PageWidth()<br>&nbsp;&nbsp; pageheight = QP.PageHeight()<br><br>&nbsp;&nbsp; If numpages = 1 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.NewPage() ' Extra page to allow capturepage() to execute for single page PDFs<br>&nbsp;&nbsp; End If<br>&nbsp;&nbsp; Dim capturedpageid As Integer = QP.CapturePage(1) ' Deletes page from document<br>&nbsp;&nbsp; If numpages &gt; 1 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.NewPage() ' Page onto which the captured page will be drawn<br>&nbsp;&nbsp; End If<br>&nbsp;&nbsp; QP.SetPageDimensions(pagewidth, pageheight)<br>&nbsp;&nbsp; QP.DrawCapturedPage(capturedpageid, ...)<br>&nbsp;&nbsp; If rotation &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.RotatePage(rotation) ' ***** ROTATE HERE TO MATCH ORIGINAL *****<br>&nbsp;&nbsp; End If<br>Next<br><br>QP.SaveToFile(newfile)<span style="font-size:10px"><br /><br />Edited by chansw - 18 Feb 12 at 3:24AM</span>]]>
   </description>
   <pubDate>Sat, 18 Feb 2012 03:20:35 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9169.html#9169</guid>
  </item> 
  <item>
   <title><![CDATA[PDFs rotate unexpectedly :  Hi Jerry,sometimes it happens,...]]></title>
   <link>http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9167.html#9167</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1569">edvoigt</a><br /><strong>Subject:</strong> 2159<br /><strong>Posted:</strong> 17 Feb 12 at 8:47PM<br /><br />Hi Jerry,<br><br>sometimes it happens, that PDFs have inside a rotate-command. The best way is to ask for this. <br><br>Look there:<br><a href="http://www.quickpdf.org/forum/drawcapturedpage-and-autorotati&#111;n_topic2071_post8882.html?KW=landscape#8882" target="_blank">http://www.quickpdf.org/forum/drawcapturedpage-and-autorotation_topic2071_post8882.html?KW=landscape#8882</a><br><br>I did give an explanation about background and on the end a short solution. You may manage or eliminate it, as you want.<br><br>Cheers,<br>Werner<br>]]>
   </description>
   <pubDate>Fri, 17 Feb 2012 20:47:46 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9167.html#9167</guid>
  </item> 
  <item>
   <title><![CDATA[PDFs rotate unexpectedly : I have seen where loading PDFs...]]></title>
   <link>http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9166.html#9166</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1861">chansw</a><br /><strong>Subject:</strong> 2159<br /><strong>Posted:</strong> 17 Feb 12 at 4:53PM<br /><br />I have seen where loading PDFs from files into QPL and then saving them result in the pages being rotated by 90 degrees (CW or CCW). <br><br>Is there a best practice way to manage / eliminate this rotation?<br><br>Thanks <br><br>Jerry<br><br>QP.LoadFromFile(origfile, "")<br>QP.SetOrigin(1)<br>Dim numpages as Integer = QP.PageCount<br>For i = 1 to numpages<br>&nbsp;&nbsp; QP.SelectPage(1)<br>&nbsp;&nbsp; ' QP.NormalizePage(0) ' If uncommmented, I get blank pages<br>&nbsp;&nbsp; pagewidth = QP.PageWidth()<br>&nbsp;&nbsp; pageheight = QP.PageHeight()<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; QP.NewPage()<br>&nbsp;&nbsp; QP.SetPageDimensions(pagewidth, pageheight)<br>&nbsp;&nbsp; capturepageid = QP.CapturePage(1)<br>&nbsp;&nbsp; QP.DrawCapturedPage(capturepageid, 36, 36, pagewidth-72, pageheight-72)<br>Next<br>QP.SaveToFile("newfile.pdf")<br><br><br>]]>
   </description>
   <pubDate>Fri, 17 Feb 2012 16:53:29 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdfs-rotate-unexpectedly_topic2159_post9166.html#9166</guid>
  </item> 
 </channel>
</rss>