gists/pdf.md

18 lines
534 B
Markdown
Raw Normal View History

2021-11-30 18:26:54 +00:00
# PDF useful commands
### Extract pages
```pdftk full-pdf.pdf cat 12-15 output outfile_p12-15.pdf```
2021-12-03 20:21:31 +00:00
### Remove password
```pdftk input.pdf input_pw <password> output output.pdf```
2022-12-09 19:39:16 +00:00
### 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```