Forum How do I...?

Avoid Double Margin When Printing?

ghosty
Hello, I'm working on some pdf docs generated using Prince, and I set the page size to be a4, with margin 10mm;

@page {
size: A4;
margin: 10mm;
}

When the PDF opens in Preview on my Mac, it's perfect. But when I save the PDF to my comp, then try to print the PDF, it shows a huge margin like it has both margin I set and the printer margin. As a test, I set the margin to 0, then it ruins the PDF but prints out with acceptable margin (which is likely the printer margin)

I also noticed that in the print dialog, the "scale to fit" option is selected by default, and it rescaled my document down to 80 something percent

Any ideas?
  1. pdf_margin.png9.9 kB
  2. printer_preview_margin.png7.9 kB
mikeday
You can tell the PDF viewer not to scale the PDF to fit the paper by applying this CSS rule:
@prince-pdf {
    prince-pdf-print-scaling: none
}