Apr 10, 2012

Creating, Compressing and Cropping PDFs in Linux

Create PDFs from image files:

Tips from this website

tiff2ps *.tif | ps2pdf13 -sPAPERSIZE=letter - > test.pdf


Crop PDFs with Briss

In the directory where it is:

java -jar briss-0.0.13.jar


Compress bulky PDFs with ghostscript


gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=foo-compressed.pdf foo.pdf


What fonts are in your PDF?

To find if your pdf has embedded fonts and view their names, from the directory that the pdf is in, do:


pdffonts foo.pdf


For eg. mine has:


name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
CKAYMA+LMRoman12-Regular             Type 1C           yes yes no      62  0
NTPZFY+LMRoman12-Bold                Type 1C           yes yes no      64  0
YKKFPO+LMRoman12-Italic              Type 1C           yes yes no     104  0
HKNYHW+LMRoman10-Italic              Type 1C           yes yes no     142  0
JAICXS+LMMathItalic12-Regular        Type 1C           yes yes yes    155  0
DPVSWF+LMMathSymbols10-Regular       Type 1C           yes yes no     157  0
IIVZIQ+MSAM10                        Type 1C           yes yes no     178  0
QEUEKI+LMMathItalic8-Regular         Type 1C           yes yes no     188  0
SPUFLJ+LMMathExtension10-Regular     Type 1C           yes yes no     203  0
SVVDGN+LMRoman8-Regular              Type 1C           yes yes no     205  0
VDWDCM+LMSans10-Bold                 Type 1C           yes yes no     226  0
UARJSI+LMMathItalic10-Regular        Type 1C           yes yes no     228  0
DWAJMK+LMSans8-Regular               Type 1C           yes yes no     220  0
CPHBRB+LMSans10-Regular              Type 1C           yes yes no     222  0
QGJULQ+LMRoman10-Regular             Type 1C           yes yes no     224  0
CGHGWD+LMMathSymbols7-Regular        Type 1C           yes yes no     377  0
VEUSRU+LMSans9-Regular               Type 1C           yes yes no     359  0
CZNQDK+LMMathItalic5-Regular         Type 1C           yes yes no     371  0
QGJULQ+LMRoman10-Bold                Type 1C           yes yes no     363  0
MCEARB+LMMathSymbols9-Regular        Type 1C           yes yes no     361  0
CZNQDK+LMMathItalic7-Regular         Type 1C           yes yes no     365  0
AJGDMV+LMMathSymbols7-Bold           Type 1C           yes yes no     373  0
QGJULQ+LMRoman7-Regular              Type 1C           yes yes no     375  0
CGHGWD+LMMathSymbols10-Bold          Type 1C           yes yes no     367  0
QGJULQ+LMRoman7-Bold                 Type 1C           yes yes no     369  0

0 Comments:

Post a Comment