gists/pdf.md

18 lines
534 B
Markdown

# PDF useful commands
### Extract pages
```pdftk full-pdf.pdf cat 12-15 output outfile_p12-15.pdf```
### Remove password
```pdftk input.pdf input_pw <password> output output.pdf```
### Extract PDF from signed P7M
```openssl smime -verify -noverify -in input.pdf.p7m -inform DER -out output.pdf```
### Remove images from PDF
```cpdf -draft input.pdf -o out.pdf```
### Increase contrast, compress and make PDF from JPEGs
```convert -quality 30 -brightness-contrast -5x10 -density 150 src/input-*.jpeg -compress jpeg output.pdf```