127

Im creating pdfs server side with lots of graphics so maximizing real estate is a must but at the same time ensuring users printers can handle the tight margins is a must.

Does anyone have an idea what safe values I can use for the margins when authoring the pdfs. In the past Ive used work and home printers with margins of about one cm with no problems but of course I can't take this as the defacto minimum.

Oh and I don't really want to allow the user to specify the margin (50% lazyness 50% will get complicated.)

Ive googled but couldn't find anything concrete. (average minimum margin printing)

robodisco
  • 4,162
  • 7
  • 34
  • 48
  • 1
    so the users will be using their own printers for this? an interesting program to look into would be photoelf: http://www.photoelf.org/help/printmargins.shtml however this program pulls printer info and printable space might be the same way you want to do it... – rownage Aug 17 '10 at 14:43
  • 1
    6 inches on all four sides for my printer. Lets all send in our measurements so we can find a safe minimum. – zaf Aug 17 '10 at 15:01
  • 1
    On Mac, find the specs for your printer with: `grep 'ImageableArea Letter' /etc/cups/ppd/*` – William Entriken Oct 17 '19 at 20:33

5 Answers5

96

Every printer is different but 0.25" (6.35 mm) is a safe bet.

aaronsnoswell
  • 6,051
  • 5
  • 47
  • 69
Douglas Anderson
  • 4,652
  • 10
  • 40
  • 49
  • 1
    This is only a safe bet on inkjets made for photo printing. Laser printers usually have a much larger margin. However, the question states that they're producing graphics, so optimizing for inkjets might be OK. – Kevin Vermeer Aug 19 '10 at 02:04
  • i thought .25 as well. Didnt know laser printers had larger margins - good thing I asked. Thanks for your replies. – robodisco Aug 19 '10 at 06:29
  • 8
    .25" is fine for most printers, including lasers. And, if you want to get samller, some printers allow you to print 'full page'. This is a hardware feature and useful when mimicking output from old XES type printers that had a smaller margins or something like an IBM 3812. You can always open Word and set page margins to 0, Word will prompt to fix these, the values it enters are the smallest margins the device supports are reported by the driver. The Lexmark laser beside me shows .248". – Douglas Anderson Oct 11 '11 at 18:47
  • 9
    tip: you can quickly find your printer's minimum margins in about 15 seconds --> open MS word --> page layout --> set all margins to 0.0 --> click OK --> *warning dialog appear* --> click "fix" --> done. The printer's minimum margin's are now displayed in the MS word GUI for editing margins. I have a black and white Brother laser: top/bottom is 0.17 inch, left/right=0.25 inch. – Trevor Boyd Smith Jul 24 '16 at 17:24
  • 2
    A few years later. Can we safely say that 0.25" on all sides is indeed a safe bet? – l33t Apr 26 '18 at 15:43
  • 1
    Also, did you consider Letter vs A4? E.g. Lexmark lists different margins for these two formats (0.125" for A4): http://publications.lexmark.com/publications/pdfs/910/macxug/eng/PrintQualityPoorAtEdges.html – l33t Apr 26 '18 at 15:55
  • 1
    Is this information publicly available for each printer model? – Melab Apr 14 '21 at 12:36
51

For every PostScript printer, one part of its driver is an ASCII file called PostScript Printer Description (PPD). PPDs are used in the CUPS printing system on Linux and Mac OS X as well even for non-PostScript printers.

Every PPD MUST, according to the PPD specification written by Adobe, contain definitions of a *ImageableArea (that's a PPD keyword) for each and every media sizes it can handle. That value is given for example as *ImageableArea Folio/8,25x13: "12 12 583 923" for one printer in this office here, and *ImageableArea Folio/8,25x13: "0 0 595 935" for the one sitting in the next room.

These figures mean "Lower left corner is at (12|12), upper right corner is at (583|923)" (where these figures are measured in points; 72pt == 1inch). Can you see that the first printer does print with a margin of 1/6 inch? -- Can you also see that the next one can even print borderless?

What you need to know is this: Even if the printer can do very small margins physically, if the PPD *ImageableArea is set to a wider margin, the print data generated by the driver and sent to the printer will be clipped according to the PPD setting -- not by the printer itself.

These days more and more models appear on the market which can indeed print edge-to-edge. This is especially true for office laser printers. (Don't know about devices for the home use market.) Sometimes you have to enable that borderless mode with a separate switch in the driver settings, sometimes also on the device itself (front panel, or web interface).

Older models, for example HP's, define in their PPDs their margines quite generously, just to be on the supposedly "safe side". Very often HP used 1/3, 1/2 inch or more (like "24 24 588 768" for Letter format). I remember having hacked HP PPDs and tuned them down to "6 6 606 786" (1/12 inch) before the physical boundaries of the device kicked in and enforced a real clipping of the page image.

Now, PCL and other language printers are not that much different in their margin capabilities from PostScript models.

But of course, when it comes to printing of PDF docs, here you can nearly always choose "print to fit" or similarly named options. Even for a file that itself does not use any margins. That "fit" is what the PDF viewer reads from the driver, and the viewer then scales down the page to the *ImageableArea.

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
  • 1
    Where do you find these PPD files? Also, are you sure that "Lower left corner is at (12|12), upper right corner is at (583|923)"? Or is **upper left** corner at (12|12) and **lower right** corner is at (583|923)? I believe graphics for instance reference (0,0) as the upper left-most portion of the screen. – Gabriel Staples Jun 10 '18 at 23:31
  • 2
    @GabrielStaples: On Linux you can find the files in `/etc/cups/ppd`. In [the PPD spec](https://wwwimages2.adobe.com/content/dam/acom/en/devnet/actionscript/articles/5003.PPD_Spec_v4.3.pdf) the dimensions are described as lower left and upper right "ll.x ll.y ur.x ur.y". – Derek Veit Jul 25 '18 at 14:40
14

As a general rule of thumb, I use 1 cm margins when producing pdfs. I work in the geospatial industry and produce pdf maps that reference a specific geographic scale. Therefore, I do not have the option to 'fit document to printable area,' because this would make the reference scale inaccurate. You must also realize that when you fit to printable area, you are fitting your already existing margins inside the printer margins, so you end up with double margins. Make your margins the right size and your documents will print perfectly. Many modern printers can print with margins less than 3 mm, so 1 cm as a general rule should be sufficient. However, if it is a high profile job, get the specs of the printer you will be printing with and ensure that your margins are adequate. All you need is the brand and model number and you can find spec sheets through a google search.

jbalk
  • 238
  • 5
  • 10
1

The margins vary depending on the printer. In Windows GDI, you call the following functions to get the built-in margins, the "no-print zone":

GetDeviceCaps(hdc, PHYSICALWIDTH);
GetDeviceCaps(hdc, PHYSICALHEIGHT);
GetDeviceCaps(hdc, PHYSICALOFFSETX);
GetDeviceCaps(hdc, PHYSICALOFFSETY);

Printing right to the edge is called a "bleed" in the printing industry. The only laser printer I ever knew to print right to the edge was the Xerox 9700: 120 ppm, $500K in 1980.

Pierre
  • 4,114
  • 2
  • 34
  • 39
-2

You shouldn't need to let the users specify the margin on your website - Let them do it on their computer. Print dialogs usually (Adobe and Preview, at least) give you an option to scale and center the output on the printable area of the page:

Adobe
alt text

Preview
alt text

Of course, this assumes that you have computer literate users, which may or may not be the case.

Kevin Vermeer
  • 2,736
  • 2
  • 27
  • 38