Compressing pdf
Type the following command (source)
$ gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=setting -sOutputFile=output.pdf input.pdfSet the input file name properly as well as the output file name if wanted.
in
-dPDFSETTINGSuse:/screenfor lowest quality/ebookfor medium quality/printerand /prepress for high quality
Modifying a pdf
command
$ convert input.pdf output.pdfOptions:
densityimage resolutionrotaterotation angle degreesattenuatenoise additionnoisenoise peak reductionflattenno virtual offline across layerssharpenGaussin operator to sharpen the image
Example (source):
$ convert -density 150 input.pdf -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 3))" -attenuate 0.15 +noise Multiplicative -flatten -attenuate 0.02 +noise Multiplicative -sharpen 0x1.0 output.pdf
Metadata info of a pdf
command pdfinfo:
$ pdfinfo file.pdf
Last updated
Was this helpful?