<?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 : RenderPage DPI from current PDF</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 : RenderPage DPI from current PDF]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 05 May 2026 03:49:57 +0000</pubDate>
  <lastBuildDate>Mon, 12 May 2014 21:15:16 +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=2893</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[RenderPage DPI from current PDF : Thanks, it works!On an example...]]></title>
   <link>http://www.quickpdf.org/forum/renderpage-dpi-from-current-pdf_topic2893_post11703.html#11703</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2560">Chopinke</a><br /><strong>Subject:</strong> 2893<br /><strong>Posted:</strong> 12 May 14 at 9:15PM<br /><br />Thanks, it works!<div><br></div><div>On an example I receive a horizontal 96dpi, but for some reason on the vertical I get 96.000121something... However if I ROUND it my software works fine.</div><div><br></div><div>Am I right to assume that when I load a PDF file it's current zoom level is its actual size = 100%?</div>]]>
   </description>
   <pubDate>Mon, 12 May 2014 21:15:16 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpage-dpi-from-current-pdf_topic2893_post11703.html#11703</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPage DPI from current PDF : Chopinke,PDF files do not have...]]></title>
   <link>http://www.quickpdf.org/forum/renderpage-dpi-from-current-pdf_topic2893_post11693.html#11693</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2893<br /><strong>Posted:</strong> 12 May 14 at 3:27AM<br /><br />Chopinke,<div><br></div><div>PDF files do not have a DPI value which is why they can be scaled and zoomed.</div><div><br></div><div>It is possible to extract the DPI of the images in the PDF but a PDF could have multiple images with various DPI values.</div><div><br></div><div>Here is some code to extract the DPI values from the images on a page.</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp;<font face="Courier New, Courier, mono">// This will extract the DPI of the image at the size it is drawn onto the PDF page.</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp;// Now that the image is draw we can calculate the number of pixels per inch that it was drawn at.</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; int id = QP.GetPageImageList(0);</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; for (int i = 1; i &lt;= QP.GetImageListCount(id); i++)</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp;{</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; int widthInPixels = QP.GetImageListItemIntProperty(id, i, 401);</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; int heightInPixels = QP.GetImageListItemIntProperty(id, i, 402);</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; // Default measurement units are in points. &nbsp;72points = 1 inch.</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; double imageWidth = Math.Abs(QP.GetImageListItemDblProperty(id, i, 503) - QP.GetImageListItemDblProperty(id, i, 501));</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; double imageHeight = Math.Abs(QP.GetImageListItemDblProperty(id, i, 508) - QP.GetImageListItemDblProperty(id, i, 502));</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; double dpix = widthInPixels / imageWidth * 72;</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; double dpiy = heightInPixels / imageHeight * 72;</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; MessageBox.Show("DPIX = " + dpix.ToString() + " &nbsp;DPIY = " + dpiy.ToString());</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp; }</font></div></div><div><br></div><div><br></div><div>Andrew.</div>]]>
   </description>
   <pubDate>Mon, 12 May 2014 03:27:40 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpage-dpi-from-current-pdf_topic2893_post11693.html#11693</guid>
  </item> 
  <item>
   <title><![CDATA[RenderPage DPI from current PDF : Hi,I have an app which creates...]]></title>
   <link>http://www.quickpdf.org/forum/renderpage-dpi-from-current-pdf_topic2893_post11691.html#11691</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2560">Chopinke</a><br /><strong>Subject:</strong> 2893<br /><strong>Posted:</strong> 10 May 14 at 6:01AM<br /><br />Hi,<div><br></div><div>I have an app which creates a PDF with exactly one image / page (like scanned PDF) using RenderPageToStream/AddImageFromStream. Now when somebody adds some text/annotation/etc to it, I want to 're-render' the page into a new one image / page PDF.</div><div><br></div><div>However I don't know the DPI of the current PDF or the image embedded to it. Can that somehow be retrieved from PDF information (media box, dropbox, etc)?</div><div><br></div><div>Your help is appreciated!</div>]]>
   </description>
   <pubDate>Sat, 10 May 2014 06:01:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/renderpage-dpi-from-current-pdf_topic2893_post11691.html#11691</guid>
  </item> 
 </channel>
</rss>