blob: f13af21ab23393a515391fefebfee365490c52b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# 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
## DjVu to pdf
ddjvu -format=pdf file.fjvu file.pdf
* `-quality=85`: can be used to produce smaller output
* `-quality=uncompressed`: disable compression
* `-page=23-48,59`: select pages to convert
* `-verbose`
* `-eachpage`: generates a separate file per page
|