Repair PDF in Make
What this module does
PDFs get corrupted at every stage of an automated pipeline - a cloud upload that drops mid-transfer, a mail server that re-encodes a binary attachment, a ZIP archive that only partially extracts, or a legacy file that has suffered years of storage bit-rot. When a broken PDF hits a downstream module - a converter, an AI parser, a forms extractor - the entire scenario fails. PDF4me - Repair PDF intercepts the problem before it propagates: it rebuilds missing cross-reference tables, fixes broken stream object boundaries, reconstructs page trees, and corrects end-of-file markers, returning a structurally sound document that every downstream module can process. Files with no damage pass through unchanged, so you can safely add this module as a universal precautionary step on every PDF entering your Make scenario - no conditional branching required.
Authenticating Your API Request
Every PDF4me module in Make requires a valid Connection. Create or select one that holds your PDF4me API key so the scenario can call the repair service securely.
Important Facts You Should Not Miss
Set File to Map and wire the Document field to actual PDF bytes from a download module - the Data field in Dropbox, Google Drive, OneDrive, or HTTP. Passing a file URL or a filename string here causes an immediate failed run, not a repair attempt. The module needs raw binary to inspect and reconstruct the PDF structure.
If the PDF passes structural validation, the module returns it byte-for-byte unchanged. There is no risk of altering or re-encoding a healthy document. This means you can place Repair PDF as a permanent step in any pipeline - before an invoice parser, before a converter, before an AI extractor - without needing a condition to check for damage first.
The module can rebuild structural damage - broken xref tables, misaligned streams, truncated bodies - but cannot recover files where the majority of binary content is missing, or files encrypted with an unknown password. For these cases the module throws an error. Right-click the module, add an error handler, and route unrecoverable files to a Slack alert, an email notification, or a quarantine folder so nothing silently disappears from your pipeline.

Set File to Map, then connect File Name and Document from the module that downloaded the PDF. The Doc Data output carries the rebuilt file to any next step.
Parameters
Required: Connection, File Name, and Document. Set File to Map first - this reveals the File Name and Document fields in the module panel.
| Parameter | Required | What it does | Example mapping |
|---|---|---|---|
| Connection | Yes | PDF4me API connection that authenticates the repair request. Click Add to create one by pasting your PDF4me API key - reused automatically across all PDF4me modules in your scenarios. | Your PDF4me connection |
| File | Yes | How the PDF is supplied to the module. Always choose Map when passing binary content from a prior download step. The Map option reveals the File Name and Document fields below. | Map |
| File Name | Yes | Original filename of the PDF including the .pdf extension. Used to name the repaired output file returned in the Doc Data field. Map from the filename output of your Dropbox, Google Drive, OneDrive, or HTTP module. | 2. File Name |
| Document | Yes | Binary content of the PDF to repair. Must be raw file bytes from a download module - the Data field in Dropbox, Google Drive, or OneDrive. Do not pass a file URL or a filename string here; the module requires actual binary to inspect and reconstruct the file structure. | 2. Data |
Output Fields
| Field | Type | What it contains |
|---|---|---|
Name | String | Filename of the repaired PDF derived from the File Name you supplied. Map this into storage module name fields. |
Doc Data | Buffer | Binary content of the rebuilt PDF. Map directly into any upload, send, convert, or processing module. For Google Drive or Dropbox upload, this maps to the Data field. |
Quick Setup
- Add PDF4me → Repair PDF to your Make scenario.
- Select Connection - or click Add and paste your API key to create one.
- Under File, choose Map to reveal the File Name and Document fields.
- Map File Name to the filename output of your download step (must include
.pdf). - Map Document to the binary data field of the same step - usually named Data.
- Right-click the module and add an Error Handler to catch files that cannot be recovered.
- Save and click Run once. The Doc Data output holds the repaired PDF buffer - wire it into any storage upload, conversion, or processing module downstream.
Workflow Examples
Workflow ExamplesCommon Make scenario patterns that include a Repair PDF step.
- Gmail Watch Emails triggers on new messages with PDF attachments from known supplier domains.
- Repair PDF runs on every attachment - mail server MIME re-encoding frequently corrupts binary streams in transit.
- The repaired Doc Data feeds into AI-Invoice Parser - no failed runs from structurally broken inputs.
- Extracted invoice fields (vendor, amount, due date) write to a Google Sheet or Airtable record automatically.
- Error handler routes unrecoverable attachments to a Slack alert for manual follow-up.
- A scheduled scenario lists all PDFs in a legacy Dropbox folder containing documents from 2010–2018.
- Each file is downloaded and passed through Repair PDF to fix bit-rot and encoding drift accumulated over years.
- Validate PDF/A checks conformance on the repaired output.
- Conforming files upload to the new SharePoint archive library. Non-conforming files log to a Google Sheet with filename and error for manual review.
- A client uploads a signed contract PDF via a Typeform or JotForm portal - upload interruptions on slow connections often truncate the file.
- Repair PDF reconstructs any structural damage from the upload before any processing begins.
- Create PDF/A converts the repaired document to a long-term archival format.
- The PDF/A file saves to a SharePoint compliance folder. A confirmation email with a download link goes to the client automatically.