# Compress a Large PDF but Keep It Readable on Screen

**Use case:** 

Compress a long government form with the balanced ebook preset and linearize it for fast web viewing. This example uses the IRS Form 1040. Choose printer for higher quality or screen for the smallest size.

## Input

```json
{
  "urls": [
    "https://www.irs.gov/pub/irs-pdf/f1040.pdf"
  ],
  "preset": "ebook",
  "linearize": true,
  "maxFileSizeMb": 50,
  "maxPagesPerFile": 500,
  "maxFiles": 1000,
  "timeoutSecs": 180,
  "maxConcurrency": 2
}
```

## Output

```json
{
  "status": {
    "label": "Status",
    "format": "string"
  },
  "sourceUrl": {
    "label": "Source",
    "format": "string"
  },
  "fileName": {
    "label": "Output",
    "format": "string"
  },
  "downloadUrl": {
    "label": "Download",
    "format": "string"
  },
  "reduced": {
    "label": "Smaller?",
    "format": "boolean"
  },
  "originalBytes": {
    "label": "Original bytes",
    "format": "integer"
  },
  "compressedBytes": {
    "label": "New bytes",
    "format": "integer"
  },
  "savedPercent": {
    "label": "Saved %",
    "format": "number"
  },
  "method": {
    "label": "Method",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The PDF Compressor: Reduce PDF File Size in Bulk Actor is ready to run with the inputs already set for "Compress a Large PDF but Keep It Readable on Screen". [Sign up or log in](https://console.apify.com/create-task-from-example/GnpOLd7QZC7XHqFZN) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Compress a Large PDF but Keep It Readable on Screen" task

The PDF Compressor: Reduce PDF File Size in Bulk Actor will start running based on the input automatically. You can also change all the input fields, like PDF URLs, compression preset, and more, to match your specific use case.

### 3. Receive the "Compress a Large PDF but Keep It Readable on Screen" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as status, source, output, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Compress a Large PDF but Keep It Readable on Screen" task via API](https://apify.com/data-done-right/pdf-compressor.md).

## About this Actor

This example demonstrates how to use [PDF Compressor: Reduce PDF File Size in Bulk](https://apify.com/data-done-right/pdf-compressor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/data-done-right/pdf-compressor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/data-done-right/pdf-compressor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
