PDFs - Guía básica de gestión UNIX
Separar PDFs
Con PDFseparate
pdfseparate -f <pagina_inicio> -l <pagina_final> <fichero_entrada>.pdf <nombre_salida>%d.pdf
Con PDFtk
pdftk <fichero_entrada> burst output <nombre_salida>-%d.pdf
Unir PDFs
pdfunite output-page1.pdf output-page2.pdf output-page3.pdf final-pages1-3.pdf
pdfunite output-page4.pdf output-page5.pdf final-pages4-5.pdf
Comprimir PDF
Con ImageMagick se puede comprimir un PDF para que manteniendo la calidad tenga un peso menor.
convert <pdf-origen> -compress Zip <nuevo-pdf-comprimido>
GhostScript
sudo apt install ghostscript
INGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf
In the above command, you should add the correct path of the input and out PDF file.
The command looks scary and confusing. I advise copying and pasting most of it. What you need to know is the dPDFSETTINGS parameter. This is what determines the compression level and thus the quality of your compressed PDF file. dPDFSETTINGS Description
/prepress # (default) Higher quality output (300 dpi) but bigger size
/ebook #Medium quality output (150 dpi) with moderate output file size
/screen #Lower quality output (72 dpi) but smallest possible output file size
Actualizado el