Crate pdfshrink

Source
Expand description

Shrink PDF files using Ghostscript.

This library provides a simple way to execute a Ghostscript command which tries to optimize the resolution of embedded images in order to reduce the file size.

Ghostscript need to be already installed on your system.

Functionsยง

dry_run_command
Command to simulate gs_command.
gs_command
Ghostscript command to shrink inpath and write to outpath.
pdf_into_subdir
Moves the file inpath into the subdirectory subdir.
pdf_subdir
Returns the subdirectory subdir sibling of inpath.
pdf_to_cmp_pdfDeprecated
Replaces a .pdf extension with .cmp.pdf.
pdf_with_suffix
Replaces a .pdf extension with .<suffix>.pdf.