From 82ccc96de73b8118d488fa48bf03850adf543bd9 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 11 Dec 2022 20:52:12 +0100 Subject: fix reorder arguments to ensure command overrides code in file --- USE.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/USE.md b/USE.md index 89f1b69..1af417b 100644 --- a/USE.md +++ b/USE.md @@ -154,15 +154,16 @@ resizing from A4 to printable-area-A4 (i.e. a dumb printer always auto-resizing to fit): gs -o output.pdf -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dFIXEDMEDIA -dCompatibilityLevel=1.4 \ - -c "<> setpagedevice" -f input.pdf + -f input.pdf -c "<> setpagedevice" + +NB! It is important to list option `-f` before `-c`, +to ensure that any `CropBox` marks in file is [overridden] by the command. TODO: maybe options `-dDEVICEWIDTHPOINTS` and `-dDEVICEHEIGHTPOINTS` are superfluous TODO: maybe options `-dDEVICEWIDTHPOINTS` and `-dDEVICEHEIGHTPOINTS` can be shortened as `-dDEVICEWIDTH` and `-dDEVICEHEIGHT` -TODO: maybe works only with `CropMark` applied for whole PDF file (and when none are applied?) but [fails] when input file already contain per-page `CropMark` hints - Source: -[fails]: - "stackoverflow answer mentioning need for mangling existing /CropMark annotations" +[overridden]: + "stackoverflow answer mentioning importance of Ghostscript argument order" -- cgit v1.2.3