Ilyworks icon

Ilyworks

Transform images and video with the Ilyworks media API

Document (PDF) → Compress

AI-generated

Summary

Compress a PDF document to reduce its file size using either a provided PDF URL or a binary PDF input.

Inputs

  • PDF URL — URL of the source PDF to compress (leave empty to use binary input).
  • Binary Property — Name of the binary property containing the PDF file to compress (used when PDF URL is empty).

Output shape

a single binary PDF file representing the compressed PDF

The operation returns the compressed PDF in binary form with content type 'application/pdf' and filename 'compress.pdf'. If a PDF URL is provided, it fetches and compresses from the URL; otherwise, it uses the binary input PDF from the specified binary property.

Examples

Example 1: Compress a PDF document provided by URL

Set the PDF URL parameter to the document's URL and leave Binary Property as default or empty.

Example 2: Compress a PDF document provided as binary data

Leave PDF URL empty and specify the binary property name that contains the PDF file.

Links

Discussion