diff options
author | Jonas Smedegaard <dr@jones.dk> | 2021-07-25 14:56:33 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2021-07-25 14:56:33 +0200 |
commit | 9586034e9a664c0a1bad06434107a5ca242d6522 (patch) | |
tree | e0879313fe53681338d7adc824778781ab561a22 | |
parent | ff3504e88a9f13fbc8d8e3c9ba8c0400955ba21d (diff) |
improve description for PDF resizing, and introduce alternative tool plakativ
-rw-r--r-- | USE.md | 38 |
1 files changed, 34 insertions, 4 deletions
@@ -19,17 +19,47 @@ or look at underlying scripts `pdftops`and `pstopdf13`. ## Resize PDF with crop marks +Simple resizing to fit target paper size +can often be done on-the-fly at the print dialog. +Resizing to another PDF file can however be more reliable, +and much cheaper when passing files to a third-party printing service. + +Some PDF processing tools rasterize content, +and scaling is often expressed as either exact width and height +or a width/height scaling factor, +only rarely as the more intuitive area factor. + +Resizing by scaling factor is particularly useful +for PDF documents containing bleed and/or crop marks, +where the the _inner_ part to fit a certain size. + +This example processes an A3 layout with crop marks +placed on A3 oversize PDF pages, +resizing to have inner part fit A4. + +### using plakativ (and mupdf internally) + +FIXME: untested! + +While the main purpose of plakativ is to not only resize +but also slice onto multiple smaller tiles, +one of its features is easy scaling by area. + + plakativ --factor=0.5 --size=250mmx337mm --output=output.pdf input.pdf + +### using Ghostscript + Ghostscript resizing is done by first defining target size and then tell to resize content to fit that target with `FitPage`. -For a PDF document containing bleed and/or crop marks, -setting a simple target `PAPERSIZE` would either scale too much +Simply setting a target `PAPERSIZE` would either scale too much or (e.g. with `-dUseArtBox`) would loose bleed and crop marks. -Instead we look up original width and height with the command `pdfinfo` +Instead we first lookup original width and height with the command `pdfinfo` and explicitly set those values scaled down by 21/29.7 (the ratio between A3 and A4 page formats). Example command, -for a PDF document with width 910.24 and height 1258.9: +for a PDF document with width 910.24 and height 1258.9 +(as reported by `pdfinfo`): gs -o output.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=643.60333 -dDEVICEHEIGHTPOINTS=890.131 -dFIXEDMEDIA -dFitPage -dCompatibilityLevel=1.4 input.pdf |