<?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 : Imported Image Resolution</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 : Imported Image Resolution]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 19:35:07 +0000</pubDate>
  <lastBuildDate>Wed, 25 Mar 2015 11:41:49 +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=3094</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[Imported Image Resolution : SOLUTION FOUND !!!The problem...]]></title>
   <link>http://www.quickpdf.org/forum/imported-image-resolution_topic3094_post12411.html#12411</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2715">MarcoAbbate</a><br /><strong>Subject:</strong> 3094<br /><strong>Posted:</strong> 25 Mar 15 at 11:41AM<br /><br />SOLUTION FOUND !!!<br>The problem is due to the fact that in any case the imported image is managed as it would have a resolution of 72 DPI.<br>In this case the PDF page takes its dimensions according to this wrong assumption.<br>To solve the problem it is mecessary to apply a scale factor from the default wrong 72 DPI resolution to the right one:<br><br>Note DPIres is the real image resolution...<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double ImageWidthInPoints = (double)QP.ImageWidth() / dpix * DPIres;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double ImageHeightInPoints = (double)QP.ImageHeight() / dpiy * DPIres;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pW=QP.ImageWidth();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pH= QP.ImageHeight();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetOrigin(1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i = QP.DrawImage(0, 0, pW, pH);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float stdRes = 72;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float PageScale = stdRes / DPIres;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetPageDimensions((pW * PageScale), (pH * PageScale));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.FitImage(0, 0, (pW * PageScale), (pH * PageScale), 0, 0, 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i = QP.SaveToFile(filePDF);<br>]]>
   </description>
   <pubDate>Wed, 25 Mar 2015 11:41:49 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/imported-image-resolution_topic3094_post12411.html#12411</guid>
  </item> 
  <item>
   <title><![CDATA[Imported Image Resolution : Hi everybody!I&amp;#039;m facing a...]]></title>
   <link>http://www.quickpdf.org/forum/imported-image-resolution_topic3094_post12409.html#12409</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2715">MarcoAbbate</a><br /><strong>Subject:</strong> 3094<br /><strong>Posted:</strong> 24 Mar 15 at 9:15AM<br /><br />Hi everybody!<br>I'm facing a strange behaviour importing images using the function "DrawImage".<br>I have a JPEG image with a resolution on 150DPI.<br>Its dimensions are 404x275 mm.<br>When I import the image, the PDF page has the dimensions of 841.7x573.3 mm.<br>After some tests I found the dimensions of the PDF page are equal to the image dimesions IF THE IMAGE WAS AT 72DPI...<br>I tried to set the correct dimensions as follows, even if some functions are redundant:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pW=QP.ImageWidth();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pH= QP.ImageHeight();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetPageDimensions(pW ,pH);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetImageResolution(150, 150, 2);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.FitImage(0, 0, pW, pH, 0, 0, 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetOrigin(1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i = QP.DrawImage(0, 0, pW, pH);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i = QP.SaveToFile(filePDF);<br><br>But I always get the same wrong dimensions (841.7x573.3 mm) in the output.<br>I tried to import JPEG, TIFF and BMP image, always with the same wrong result.<br>Note the images by themselves are correct, with the right ( 404x275 mm).<br>Do you have any hint or solution about this issue?<br>Thank you very much in advance!<br>Marco.<br><br>]]>
   </description>
   <pubDate>Tue, 24 Mar 2015 09:15:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/imported-image-resolution_topic3094_post12409.html#12409</guid>
  </item> 
 </channel>
</rss>