Details
Description
A newer version of the dompdf package introduced in CRM-8333 has caused the margin settings in PDF Page Formats to be about 1/2 inch larger than the settings. This is a result of dompdf supporting CSS3 @page styles to define page margins.
If you create a PDF Letter with this HTML: <div>This is my letter.</div>, and set the Page Format margins to zero, then the text in the resulting PDF will still have a 1/2 inch top and left margin.
The fix is to change line 72 in CRM/Utils/PDF/Utils.php from this:
<style>body { margin: {$t}{$metric} {$r}{$metric} {$b}{$metric} {$l}{$metric}; }</style>
to this:
<style>@page { margin: {$t}{$metric} {$r}{$metric} {$b}{$metric} {$l}{$metric}; }</style>