<?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 : Finding Printer Margins</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 : Finding Printer Margins]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 17 May 2026 16:32:35 +0000</pubDate>
  <lastBuildDate>Thu, 15 Oct 2009 09:26:29 +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=1235</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[Finding Printer Margins : Thank you DELBEKE, Note that :...]]></title>
   <link>http://www.quickpdf.org/forum/finding-printer-margins_topic1235_post5697.html#5697</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1170">stakon</a><br /><strong>Subject:</strong> 1235<br /><strong>Posted:</strong> 15 Oct 09 at 9:26AM<br /><br />Thank you DELBEKE,<br><br>&nbsp;&nbsp;&nbsp; Note that :<br>&nbsp;&nbsp;&nbsp; PrnWidth = GetDeviceCaps(Dc, PHYSICALWIDTH)<br>&nbsp;&nbsp;&nbsp; PrnHeight = GetDeviceCaps(Dc, PHYSICALHEIGHT)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; return the actual <b>paper's</b> width/heigth , not the printable area.<br><br>After doing some further research:<br>&nbsp;&nbsp;&nbsp; PortraitOffsetX = GetDeviceCaps(Printer.hDC, PHYSICALOFFSETX)<br>&nbsp;&nbsp;&nbsp; PortraitOffsetY = GetDeviceCaps(Printer.hDC, PHYSICALOFFSETY)<br>&nbsp; <br>&nbsp;&nbsp;&nbsp; return the real printer offsets from top and left (ie. the position where the printer can start<br>&nbsp;&nbsp;&nbsp;&nbsp; printing)<br>&nbsp;&nbsp;&nbsp; the measurement&nbsp; returned in <b>D</b>evice <b>U</b>nits which is essentially <b>DU</b> <b>= dpi*inches</b> <br>&nbsp;&nbsp;&nbsp; So we have to know our printer's dpi to calculate our document in inches/milimeters<br>&nbsp;&nbsp;&nbsp; This is achieved by :<br>&nbsp;&nbsp;&nbsp; CPrintDialog dlg(FALSE);<br>&nbsp;&nbsp;&nbsp; app-&gt;GetPrinterDeviceDefaults(&amp;dlg.m_pd)<br>&nbsp;&nbsp;&nbsp; LPDEVMODE devmode = dlg.GetDevMode();<br>&nbsp;&nbsp;&nbsp; short dpi = devmode-&gt;dmPrintQuality;<br><br><br><br>&nbsp;&nbsp;&nbsp; <br>]]>
   </description>
   <pubDate>Thu, 15 Oct 2009 09:26:29 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/finding-printer-margins_topic1235_post5697.html#5697</guid>
  </item> 
  <item>
   <title><![CDATA[Finding Printer Margins : You can use Wndows apis to find...]]></title>
   <link>http://www.quickpdf.org/forum/finding-printer-margins_topic1235_post5692.html#5692</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=129">DELBEKE</a><br /><strong>Subject:</strong> 1235<br /><strong>Posted:</strong> 15 Oct 09 at 6:52AM<br /><br />You can use Wndows apis to find printer margins<DIV></DIV><DIV></DIV><DIV>&nbsp;&nbsp;&nbsp; PortraitOffsetX = GetDeviceCaps(Printer.hDC, PHYSICALOFFSETX)<BR>&nbsp;&nbsp;&nbsp; PortraitOffsetY = GetDeviceCaps(Printer.hDC, PHYSICALOFFSETY)<BR>&nbsp;&nbsp;&nbsp; PrnWidth = GetDeviceCaps(Dc, PHYSICALWIDTH)<BR>&nbsp;&nbsp;&nbsp; PrnHeight = GetDeviceCaps(Dc, PHYSICALHEIGHT)<BR></DIV>]]>
   </description>
   <pubDate>Thu, 15 Oct 2009 06:52:21 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/finding-printer-margins_topic1235_post5692.html#5692</guid>
  </item> 
  <item>
   <title><![CDATA[Finding Printer Margins : Good Day,I am using QuickPDF to...]]></title>
   <link>http://www.quickpdf.org/forum/finding-printer-margins_topic1235_post5663.html#5663</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1170">stakon</a><br /><strong>Subject:</strong> 1235<br /><strong>Posted:</strong> 13 Oct 09 at 7:54AM<br /><br />Good Day,<br><br>I am using QuickPDF to print some engineering manuals where precision matters.<br><br>So when i print a PDF i cannot use the "Page Scaling" option because then the printed dimensions will not be accurate.<br>The solution is to find the printer margins, and create a cropBox not containing them.<br>Ideally i would like to make my application print correctly in different printers.<br>My question is:&nbsp; Is there a way to find the printer Margins using QuickPDF?<br><br>Thanx in advance,<br><br>Stakon.<br><br>]]>
   </description>
   <pubDate>Tue, 13 Oct 2009 07:54:48 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/finding-printer-margins_topic1235_post5663.html#5663</guid>
  </item> 
 </channel>
</rss>