# PDF Prepress Preflight Checker (`luckborn/pdf-preflight-checker`) Actor

Production-grade print-readiness validator. Checks bleed, CMYK color space, image resolution (300dpi), font embedding, ink coverage (TAC), trim marks, page consistency, overprint, and PDF/X compliance. $1.99/check.

- **URL**: https://apify.com/luckborn/pdf-preflight-checker.md
- **Developed by:** [Luck Born](https://apify.com/luckborn) (community)
- **Categories:** AI, Agents, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🖨️ PDF Prepress Preflight Checker

**Production-grade print-readiness validation for PDF files. Built by a prepress professional with 6 years of packaging expertise.**

Drop a PDF → get a 9-point preflight report telling you exactly what's print-ready and what isn't.

***

### ✅ Checks Performed

| # | Check | What It Catches |
|---|-------|----------------|
| 1 | **Bleed** | No bleed or bleed < 3mm beyond trim |
| 2 | **Color Space** | RGB content that will shift during RIP |
| 3 | **Image Resolution** | Images below 300dpi at placed size |
| 4 | **Font Embedding** | Missing fonts → font substitution at RIP |
| 5 | **Ink Coverage (TAC)** | Areas exceeding 300% TAC (drying/set-off risk) |
| 6 | **Page Consistency** | Mixed page sizes in one document |
| 7 | **Trim Marks** | Missing crop marks |
| 8 | **Overprint** | Accidental overprint causing surprises |
| 9 | **PDF/X Compliance** | PDF/X-1a or PDF/X-4 output intent |

***

### 📊 Sample Output

```json
{
  "filename": "brochure_a4_print.pdf",
  "total_pages": 16,
  "file_size_bytes": 4248832,
  "print_ready": false,
  "summary": {
    "passed": 5,
    "warnings": 2,
    "failed": 2,
    "total_checks": 9
  },
  "checks": [
    {
      "check": "Bleed",
      "severity": "fail",
      "message": "No bleed detected on 4/16 pages",
      "details": "MediaBox equals TrimBox — artwork extends to trim edge only. Add 3mm bleed on all sides.",
      "pages_affected": [3, 7, 12, 15]
    },
    {
      "check": "Image Resolution",
      "severity": "fail",
      "message": "3/12 images below 300dpi",
      "details": "Lowest: 72dpi (img: logo_rgb.png, page 1)",
      "pages_affected": [1, 8]
    },
    {
      "check": "Font Embedding",
      "severity": "pass",
      "message": "All 8 fonts embedded",
      "details": "No font substitution risk at RIP."
    }
  ]
}
```

***

### 🎯 Preflight Profiles

| Profile | TAC Limit | Use Case |
|---------|-----------|----------|
| `sheetfed_offset` | 300% | Commercial print, packaging, brochures |
| `web_offset` | 280% | Magazines, catalogs (heatset) |
| `newspaper` | 240% | Newsprint (coldset) |
| `digital` | 320% | Digital press, toner-based |

***

### 💰 Pricing (Apify Store)

**$1.99 per preflight check** — pay only when you validate a PDF.

Compare: Enfocus PitStop Pro — €1,400+/year license. pdfRest API — $99+/month.

***

### 🏭 Who This Is For

- **Print shops** — validate customer files before they hit the RIP
- **Graphic designers** — self-check before sending to print
- **Print buyers** — verify supplier files meet spec
- **Packaging prepress** — catch bleed/overprint issues before plate-making
- **Print-on-demand APIs** — automated preflight in your upload pipeline

***

### 🚀 Running Locally

```bash
pip install -r requirements.txt
python main.py https://example.com/my-file.pdf
python main.py my-local-file.pdf --profile web_offset --json
```

***

### 🛠 Technical Stack

- **pypdf** — PDF structure, metadata, page boxes, font inspection
- **pdfplumber** — Advanced content extraction
- **pikepdf** — Low-level PDF content stream analysis (TAC, overprint)
- **Pillow** — Embedded image resolution checking
- **Apify SDK** — Platform integration + PPE billing

***

### ⚠️ Limitations

- **TAC is estimated** — full ink coverage analysis requires a RIP (raster image processor). This Actor samples content streams for CMYK values as a heuristic. For production-critical TAC verification, confirm with a dedicated preflight tool (PitStop, Callas pdfToolbox).
- **Overprint detection is structural** — checks ExtGState OP/OPM flags in the PDF. Content-level overprint set via operators may not be fully detected.
- **Spot colors** are detected and reported but not validated against a Pantone library.

***

### 👤 Author

Built by KONTENTA Agency — 6 years of prepress and packaging production experience, now available as an API.

> "I've rejected enough customer PDFs to know exactly what goes wrong. This Actor automates that conversation."

# Actor input Schema

## `pdfUrl` (type: `string`):

URL to the PDF file to check (publicly accessible)

## `profile` (type: `string`):

Print process profile — adjusts ink coverage thresholds

## Actor input object example

```json
{
  "pdfUrl": "https://example.com/my-print-file.pdf",
  "profile": "sheetfed_offset"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "pdfUrl": "https://example.com/my-print-file.pdf"
};

// Run the Actor and wait for it to finish
const run = await client.actor("luckborn/pdf-preflight-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "pdfUrl": "https://example.com/my-print-file.pdf" }

# Run the Actor and wait for it to finish
run = client.actor("luckborn/pdf-preflight-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "pdfUrl": "https://example.com/my-print-file.pdf"
}' |
apify call luckborn/pdf-preflight-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=luckborn/pdf-preflight-checker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/y9omL5JMCpPSkfibu/builds/x6buvA1m04s0aCifO/openapi.json
