# PDF Compressor > Make PDFs smaller with Ghostscript presets or custom image DPI and JPEG quality, with previews. Re-writes a PDF with Ghostscript using the screen, e-book, printer or prepress preset, or your own image resolution and JPEG quality. Shows the size before and after, can compare up to three presets side by side, and renders page 1 before and after so you can judge the quality. If the result is not smaller, you get the original back. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://pdfcompressor.usefulweb.site/ (interactive tool at https://pdfcompressor.usefulweb.site/tool) - JSON API: POST https://pdfcompressor.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://pdfcompressor.usefulweb.site/api/v1/tool) - OpenAPI: https://pdfcompressor.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://pdfcompressor.usefulweb.site/mcp - tool `pdf_compressor` ## Inputs - file (file, required): PDF - Max 100 MB. Processed on our server and deleted; results can be downloaded for about 2 hours. - preset (select): Compression level - compare (boolean): Compare up to three levels (slower) - Also runs the next levels so you can download and compare each. - imageDpi (integer): Image resolution (custom) - jpegQuality (integer): JPEG quality (custom) - grayscale (boolean): Convert to grayscale - password (text): PDF password (only if the file is protected) - Used only to open the file for this conversion; it is written to a private temporary file, never to a command line, and deleted with the job. ## Method - The PDF is validated with qpdf and decrypted with your password if needed. Ghostscript (pdfwrite) then rewrites it: images are downsampled to the preset resolution and re-compressed, fonts are subset and compressed, duplicate images are stored once. - Presets follow Ghostscript's -dPDFSETTINGS: screen ≈ 72 DPI images, ebook ≈ 150 DPI, printer and prepress ≈ 300 DPI (prepress keeps more colour information). Custom sets the colour/gray image resolution and the JPEG quality directly. - Savings = 1 − new size ÷ original size. When a level does not make the file smaller (common for text-only or already optimised PDFs), the original file is returned for that level instead. - Page 1 is rendered at the same size before and after (Poppler) so you can compare image quality and text sharpness. - Dates and random IDs are removed from the output so the same input always gives the same file. Document title/author are kept; XMP metadata is removed. ## Limits - Ghostscript re-creates the PDF: interactive elements such as form fields usually survive, but digital signatures become invalid and some rare features may be lost. Keep your original.