unityaisolutions/pdf-compressor

A powerful PDF compression tool with image optimization capabilities, built for Replicate.

Public
3 runs

Run unityaisolutions/pdf-compressor with an API

Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.

Input schema

The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.

Field Type Default value Description
pdf
string
PDF file to compress
compress_images
boolean
True
Compress images within the PDF
image_quality
integer
75

Min: 1

Max: 100

JPEG quality for image compression (1-100)
image_max_size
integer
1920
Maximum image dimension in pixels (0 = no resize)
remove_metadata
boolean
True
Remove PDF metadata to reduce file size
deflate_level
integer
6

Min: 1

Max: 9

Flate compression level (1-9, higher = better compression)

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{
  "type": "array",
  "items": {
    "type": "string",
    "format": "uri"
  },
  "title": "Output",
  "x-cog-array-type": "iterator"
}