I have a pdf file that contains images and I want to reduce its size in order to upload it to a site with a size limit.
So, how can I reduce the size of a pdf file from the command-line?
compressionpdf
I have a pdf file that contains images and I want to reduce its size in order to upload it to a site with a size limit.
So, how can I reduce the size of a pdf file from the command-line?
Best Answer
You can use
gs
- GhostScript (PostScript and PDF language interpreter and previewer) as follows:-sDEVICE=pdfwrite
Use the appropriate
-dPDFSETTINGS
.From Documentation:
-o
option to output file which also set-dNOPAUSE
and-dBATCH
(see Interaction-related parameters)Example:
Here
-q
suppress normal startup messages, and also do the equivalent of-dQUIET
which suppresses routine information comments