Last active
January 6, 2021 09:56
-
-
Save tuxdna/b6696310ca83cfbfadb65d38bdcc90e1 to your computer and use it in GitHub Desktop.
Downsize scanned PDF files for low space
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find the number of pages in pdf file | |
qpdf --show-npages file_name.pdf | |
# split into multiple pages using first-to-last range, where first page is 1 and last page is 4 | |
pdftoppm -jpeg -f 1 -l 4 some-file.pdf p | |
# combine into single pdf | |
convert p-1.jpg p-2.jpg p-3.jpg p-4.jpg some-file-downsized.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment