doctools#
PDF utilities for extracting images and compressing PDFs.
- matviz.doctools.compress_pdf_images(input_pdf_path: str, output_pdf_path: str, dpi: int = 150, quality: int = 40) str[source]#
Compresses all images in the PDF by rendering pages as compressed images. Returns the path to the compressed PDF.
dpi: controls the resolution of the page rendering. quality: JPEG quality setting (0-100).