Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Command line tool to crop PDF documents?
Date: Thu, 21 May 2020 15:16:53
Message-Id: ra660k$2mpj$1@ciao.gmane.io
In Reply to: Re: [gentoo-user] Command line tool to crop PDF documents? by Ashley Dixon
1 On 2020-05-21, Ashley Dixon <ash@××××××××××.uk> wrote:
2
3 > There is also [1], which is a slightly improved version of Oberdiek's pdfcrop.
4 > It uses pure GhostScript and Perl to work around some of the caveats of pdfcrop,
5 > including preserving interactive content (such as hyperref links in TeX
6 > documents) and allowing you to avoid emerging the huge texlive-core package for
7 > one small utility.
8 >
9 > [1] https://tex.stackexchange.com/a/42259/
10
11 I don't see any pure Perl/Ghostscript utility in that thread. There's
12 a bash program, but it doesn't support compression in input files.
13
14 The pdfcrop.pl included in texlive seems to work OK with compressed
15 input files, but the output filesize balloons up by about 6X.
16
17 This app did work beautifully with no fuss:
18
19 https://pypi.org/project/pdfCropMargins/
20 https://github.com/abarker/pdfCropMargins
21
22 I can remove the crop marks from a PDF book, and then keep as much or
23 little of the remaining whitespace margins as I want. The output file
24 is smaller than the input file (which is sort of what you'd expect
25 when you're removing stuff).
26
27 Now I can uninstall TexLive until the next time I need to tweak my
28 résumé. :) I usually do have TexLive installed, but a while back it
29 was causing a blockage when trying to do an update. So I uninstalled
30 it in order to get on the the 'emerge -auvND world' and never got
31 around to re-installing it until today.
32
33 --
34 Grant

Replies

Subject Author
Re: [gentoo-user] Re: Command line tool to crop PDF documents? Ashley Dixon <ash@××××××××××.uk>