Projekt

Allgemein

Profil

Howto pdf » Historie » Version 2

Jeremias Keihsler, 24.03.2026 09:56

1 1 Jeremias Keihsler
h1. Howto pdf
2
3
h2. splitting pdf in ranges
4
5
qpdf is doing the job
6
7
<pre><code class="shell">
8
qpdf really_large.pdf --pages . 1739-1987 -- really_large_section.pdf
9
</code></pre>
10
11
but qpdf is lossless, so the size of the pdf stays basically unchanged.
12
To resize the pdf, let's rerender it and save only the needed content.
13
14
<pre><code class="shell">
15
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -sOutputFile=really_large_section.pdf_small.pdf really_large_section.pdf
16
</code></pre>
17 2 Jeremias Keihsler
18
h2. concat pdfs
19
20
either provide the name of each part directly
21
22
<pre><code class="shell">
23
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=unified.pdf pdf-part1.pdf pdf-part2.pdf
24
</code></pre>
25
26
alternatively have all of them in a subdirectory presorted. The sequence of the file-listing equals the sequence within the new unified.pdf
27
28
<pre><code class="shell">
29
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=unified.pdf ./pdf-parts/*.pdf
30
</code></pre>