m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pdf.md
blob: 2fc12953055a45598689da9773e69eaedbc97bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# PDF operations

## Merge

    gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf

## Compress

    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=output.pdf input.pdf

## Extract pages

    pdfjam --outfile out.pdf in.pdf 1,3,4-7

## Images to pdf

    convert in1.jpg in2.jpg out.pdf