<?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 : DrawRotatedImage, Centering, FitImage</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 : Sample Code : DrawRotatedImage, Centering, FitImage]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 08 May 2026 06:06:39 +0000</pubDate>
  <lastBuildDate>Tue, 28 Feb 2006 13:06:38 +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=339</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[DrawRotatedImage, Centering, FitImage : I was attempting to draw an image...]]></title>
   <link>http://www.quickpdf.org/forum/drawrotatedimage-centering-fitimage_topic339_post1440.html#1440</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=307">PaladinTodd</a><br /><strong>Subject:</strong> 339<br /><strong>Posted:</strong> 28 Feb 06 at 1:06PM<br /><br /><P>I was attempting to draw an image rotated and centered onto a PDF. The actual image would vary and was not under my control - the user can upload any size image. I went through a lot of brain damage trying to make FitImage work, but could not do it. I ended up using DrawRotatedImage and got it to work with a little bit of trouble. Here's the code in case anyone gets stuck with the same problem (Visual FoxPro code). </P><P>&nbsp;&nbsp;&nbsp;&nbsp;PRIVATE lMaxHeight, lMaxWidth, lWidth, lHeight, lAdj<BR>&nbsp;&nbsp;&nbsp;&nbsp;lMaxHeight = 45<BR>&nbsp;&nbsp;&nbsp;&nbsp;lMaxWidth = 90<BR>&nbsp;&nbsp;&nbsp;&nbsp;lWidth = opdfedit.o.ImageWidth<BR>&nbsp;&nbsp;&nbsp;&nbsp;lHeight = opdfedit.o.ImageHeight<BR>&nbsp;&nbsp;&nbsp;&nbsp;lAdj = 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;IF lHeight &gt; lMaxHeight<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lAdj = lMaxHeight / lHeight<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lHeight = lHeight * lAdj<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lWidth = lWidth * lAdj<BR>&nbsp;&nbsp;&nbsp;&nbsp;ENDIF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;IF lWidth &gt; lMaxWidth<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lAdj = lMaxWidth / lWidth<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lHeight = lHeight * lAdj<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lWidth = lWidth * lAdj<BR>&nbsp;&nbsp;&nbsp;&nbsp;endif</P><P><BR>&nbsp;&nbsp;&nbsp;&nbsp;lReturn = opdfedit.o.DrawRotatedImage(lpdfx + lHeight, lpdfy + (lWidth / 2), lWidth, lHeight, 90)<BR></P><P>lPDFX = the left edge of the image. LPDFY = the mid-point where you want things to center around. </P>]]>
   </description>
   <pubDate>Tue, 28 Feb 2006 13:06:38 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/drawrotatedimage-centering-fitimage_topic339_post1440.html#1440</guid>
  </item> 
 </channel>
</rss>