Create/Edit
Comprehensive guide to PDF.co’s document manipulation APIs for programmatic PDF generation, editing, and transformation. Includes endpoints for merging, splitting, text insertion, page deletion, and other document modifications with code examples.
PDF Split
I Want to Skip PDF Merge When No Files Are Attached
You’re trying to merge PDF files from incoming records—but not every record includes attachments. When your automation tries to merge an empty list of files, it can fail or waste credits.
Why This Happens
PDF Merge requires at least one valid file input. If no attachments are present, your merge step may return an error like: “No valid file URLs provided.”
How to Handle Records Without Attachments
- Use a conditional step before the merge action to check if attachments exist.
- Only proceed when files are present.
Zapier Example
If you’re using Zapier:
- Trigger – New record (e.g., from Airtable or Google Sheets)
- Filter – Use Filter by Zapier
- Set condition: Attachment field exists or is not empty
- Action – Merge PDFs with PDF.co
If the filter condition isn’t met, the Zap stops before the merge step.
Other Platforms
- Make.com – Use a filter or router before the merge module
- n8n – Use an IF node to check if files exist
- Custom API – Add a simple if condition in your code to check for attachments before calling /pdf/merge
Helpful Tips
- Always check that the file array has one or more items
- Validate file URLs or objects before sending to PDF.co
- This saves credits and avoids unnecessary merge attempts
Still Need Help? Contact Support
To help you faster, include:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- A sample record or input file
- Any error message or screenshot
I Want to Merge PDF Files (or Other Documents)
You want to combine multiple files into a single PDF using PDF.co. PDF.co offers two endpoints depending on what kind of files you’re merging.
General Workflow
- Choose the right endpoint for your files
- Prepare your input URLs or upload files
- Run the merge process using your platform (API, Zapier, Make, etc.)
- Download the merged file from the output URL
Which Merge Endpoint Should I Use?
Use Case | Endpoint |
---|---|
Only PDF files | Use /pdf/merge |
Mix of PDFs, images, Word, Excel, etc. | Use /pdf/merge2 |
Platform-Specific Related Resources
- Zapier:
- Make:
- Other Integrations:
- Contact us for guidance on specific platforms.
Helpful Tips
- Files are merged in the order you list them
- You can upload files first using the File Upload API
- Merging large files? Use async: true to avoid timeouts. You’ll need to check when the job is complete before downloading. Learn how async mode works
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if you saw one)
- A screenshot or brief description of what went wrong.
I Want to Reorder Pages in a PDF
You need to rearrange the pages of a PDF document—such as moving page 5
to the end or placing page 2
at the beginning.
How to Reorder Pages
To reorder pages, you’ll use two steps
- Split the PDF into separate parts.
- Merge the parts back together in the desired order.
Example: Move Page 5 to the End
For a 10-page
PDF where you want to move page 5
to the end:
Split the PDF:
- Use the /pdf/split endpoint with the pages parameter set to
1-4,5,6-10
. - This will produce three PDFs:
- Pages
1–4
- Page
5
- Pages
6–10
Merge the PDFs:
- Pages
- Use the /pdf/merge endpoint.
- Provide the URLs of the split PDFs in the desired order:
- Pages
1–4
- Pages
6–10
- Page
5
- Pages
This will result in a new PDF with pages ordered as 1–4, 6–10, 5
.
Platform-Specific Related Resources
Zapier:
- How to Merge Files Using Zapier and PDF.co
- How to Merge ZIP, Doc, XLS, RTF, PNG, JPG Files into Single PDF using Zapier
- How to Split PDF by Text using PDF.co and Zapier
Make:
- Merge PDF Files using PDF.co and Make
- Splitting Large PDF with Multiple Pages using PDF.co and Make
- Other Integrations : Contact us for guidance on specific platforms.
Helpful Tips
- Use
"pages": "*"
to split each page into a separate file. - For large files, set “async”: true and monitor the job status.
- Ensure the merge order reflects the desired final page sequence.
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if you saw one).
- A screenshot or brief description of what went wrong
I Want to Insert an Empty Page into a PDF
You need to insert a blank page into a PDF document—whether at the beginning, middle, or end of the file.
How to Insert an Empty Page
To insert an empty page into a PDF, you’ll use two main steps:
- Split the PDF if you need to insert in the middle.
- Merge the parts of the PDF along with the blank page in the correct order.
You can quickly generate an empty PDF page using the PDF Edit Add Helper tool.
Simply follow these steps:
- Visit https://app.pdf.co/pdf-edit-add-helper.
- On the canvas that appears, click anywhere on the blank page to activate the editor.
- Do not add any text or elements—this will ensure the page remains empty.
- Click “Generate PDF and Preview”.
- Once the preview appears, click “Download PDF” to save your blank page.
This file will now serve as your empty PDF page, which you can insert into another document using the merge method.
Example 1: Insert a Blank Page at the Beginning or End
If you already have a blank PDF page:
- Insert at the Start: Use the /pdf/merge endpoint with the URLs listed as:
empty_page.pdf, your_main_pdf.pdf
Insert at the End: Switch the order of URLs:
your_main_pdf.pdf, empty_page.pdf
Example 2: Insert a Blank Page in the Middle
For example, to insert an empty page between two pages of a 2-page PDF:
- Use the /pdf/split endpoint with the pages parameter set to
1,2
.- This gives two PDFs: Page 1 and Page 2.
- Merge the parts using /pdf/merge:
- Order: Page 1 → Empty Page → Page 2
Platform-Specific Related Resources
Zapier:
- How to Merge Files Using Zapier and PDF.co
- How to Merge ZIP, Doc, XLS, RTF, PNG, JPG Files into Single PDF using Zapier
Make:
Other Integrations:
- Contact us for guidance on specific platforms.
Helpful Tips
- Only working with PDF files? → Use the /pdf/merge endpoint.
- Merging a mix of PDFs, images, Word, Excel, etc.? → Use the /pdf/merge2 endpoint.
- Use the PDF Edit Add Helper Tool to create a blank PDF page quickly.
- Use
"pages": "*"
to split each page into separate files. - For large files, set
"async": true
and monitor job status. - Ensure merge order matches your desired page sequence.
Still Need Help? Contact Support
To assist you faster, please include:
- What you’re trying to do
- Any input files, URLs, or sample data
- The exact error message (if any)
- A screenshot or short explanation of the issue
I Want to Merge Password-Protected PDFs
You need to merge two or more PDF documents that are password-protected—such as combining encrypted reports or forms into a single file.
Important: While we plan to add built-in password removal in an upcoming update to the PDF Merger API, this feature is not yet available.
For now, you’ll need to first remove the password using the PDF Security API (/pdf/security/remove), and then pass the unlocked PDFs into the PDF Merger API.
How to Merge Password-Protected PDFs
To merge password-protected PDFs, you’ll use three steps:
- Remove the Password from Each PDF
- Merge the Unprotected PDFs (Optional) Re-apply Password Protection to the Final Merged PDF
Example: Merge Two Secured PDFs
You have two password-protected PDFs that you want to combine. Step 1: Remove the Passwords
- Use the /pdf/security/remove endpoint.
- Provide the file URL and password to decrypt each file. Step 2: Merge the Unlocked PDFs
- Use either the /pdf/merge or /pdf/merge2 endpoint.
- Pass the URLs of the unprotected files in the desired order. Step 3 (Optional): Add a New Password
- If you want to secure the final merged document, use the /pdf/security/add endpoint.
- Specify the new password and permissions.
Platform-Specific Related Resources
Zapier:
- Convert Google Docs into Password-Protected PDF using PDF.co and Zapier
- How to Merge Files Using Zapier and PDF.co
- How to Merge ZIP, Doc, XLS, RTF, PNG, JPG Files into Single PDF using Zapier
Make:
- Convert Google Docs into Password-Protected PDF using PDF.co and Make
- Merge PDF Files using PDF.co and Make
Other Integrations:
- Contact us for guidance on specific platforms.
Helpful Tips
- Only working with PDF files? → Use the /pdf/merge endpoint.
- Merging a mix of PDFs, images, Word, Excel, etc.? → Use the /pdf/merge2 endpoint.
- Always remove passwords before attempting to merge.
- Use /pdf/security/add after merging if you need to re-secure the final file.
- Ensure that the original file URLs are accessible if using cloud-based tools.
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if you saw one)
- A screenshot or brief description of what went wrong
How to Merge Files and Get a Uniform Page Size
By default, /pdf/merge and /pdf/merge2 keep the original page sizes of the source files. If your input files have different page sizes, the merged PDF will also have mixed sizes.
How to Ensure a Uniform Page Size
- Standardize the page size before merging:
- Adjust the page size in each source document using their original editor.
- Export all files to PDF (if applicable)
- Merge the documents
- Use /pdf/merge to combine PDFs only.
- Use /pdf/merge2 if combining PDFs with other file types (images, Word, Excel, etc.).
Important Notes:
- PDF.co cannot change or standardize page sizes at merge time.
- Any size differences must be fixed before exporting to PDF.
- PowerPoint and Word automatically scale content when resizing pages.
When to Use /pdf/merge vs /pdf/merge2:
Endpoint | Use Case |
---|---|
/pdf/merge | Merge PDFs only (faster, uses fewer credits) |
/pdf/merge2 | Merge PDFs + images + Word + Excel + other files |
Helpful Tips:
- For large files, use “async”: true to process asynchronously.
- Use /pdf/info to check page sizes in PDFs before merging.
- If merging scanned files, ensure they were created/exported with the same page size.
Still Need Help? Contact Support
To speed up support, please send:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Input files or URLs
- Any error messages or screenshots
I Want to Split PDF Pages and Rename Each by Its Text Content
You need to split a PDF document into separate pages and rename each file based on its text content—such as a customer name, invoice number, or ID.
How to Split and Rename PDF Pages
To split and rename each page, you’ll follow three steps:
- Split the PDF into individual pages.
- Extract text from each page.
- Rename each page using the extracted text.
Example: Split and Rename by Customer Name
For a multi-page PDF (e.g., invoices), where each page is for a different customer:
- Split the PDF
- Use the /pdf/split endpoint with the parameter:
"pages": "*"
- This will split each page into a separate file.
- Extract Text
- Use the /pdf/documentparser endpoint to extract identifying information (e.g., customer name) from each split PDF.
- Rename Each PDF
- Use the output from the document parser to rename the PDF using meaningful identifiers (like
Customer_JohnDoe.pdf
).
Platform-Specific Related Resources
- Make/Integromat: Split PDF and Extract Text
- Make/Integromat: Rename PDF Using Extracted Data
- Other Integrations: Contact us for guidance on specific platforms.
Helpful Tips
- Use
"pages": "*"
to split every page individually. - Set
"async": true
for large files to avoid timeouts. - Make sure each page has unique, extractable text for clear renaming.
- Use the extracted values as dynamic filenames in your automation.
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if you saw one)
- A screenshot or brief description of what went wrong
I Want to Split a PDF into Individual Pages
You need to separate each page of a PDF into its own individual PDF file—for example, turning a 4-page document into 4 separate single-page PDFs.
How to Split a PDF into Individual Pages
To split a PDF, you’ll use the /pdf/split endpoint and the special "pages": "*"
parameter. This tells PDF.co to split every page into its own individual file.
Example: Split a 4-Page PDF into Individual Pages
If you have a 4-page PDF and want to extract each page as a standalone file: Split the PDF:
- Use the /pdf/split endpoint with the following input:
This will return 4 separate PDF URLs:
- Page 1 -
https://pdf-temp-files.s3.us-west-2.amazonaws.com/BX1VZ5KCFEA7Z764XMX6…...
- Page 2 -
https://pdf-temp-files.s3.us-west-2.amazonaws.com/1KQXP5H6MPDF0R8……….….
- Page 3 -
https://pdf-temp-files.s3.us-west-2.amazonaws.com//GEVFWLNV6LYS5YJ0N……....
- Page 4 -
https://pdf-temp-files.s3.us-west-2.amazonaws.com/VP4XBM4V30DAKTKSCV……..
Using Make/Integromat for Over 25 Pages
If you’re working in Make (formerly Integromat) and want to split a PDF with more than 25 pages:
- Create a new scenario.
- Use the PDF.co Make an API Call module.
- Set API Endpoint to
/v1/pdf/split
. - In the Input Type field, choose to Override the
url
param with a value and enter the URL of the PDF file you want to split. - Click on
Add item
under theBody
section. - Run the scenario.
Note: The standard Split a PDF module in Make supports only up to 25 pages.
Platform-Specific Related Resources
- Make/Integromat: Split Large PDF With Multiple Pages in Make
- Other Integrations: Contact us for guidance on specific platforms.
Helpful Tips
- Use
"pages": "*"
to split each page into its own file. - Use
"pages": "1,2-5,7-"
to define custom ranges (e.g., pages 1, 2–5, and 7 to the end). - If splitting a large PDF (e.g., 100+ pages), set
"async": true
and monitor the job status. - The Split module in Make has a 25-file limit. For more pages, use the Make an API Call module instead
Still Need Help? Contact Support
To speed things up, send us:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- Any error messages or unexpected outputs
- A screenshot or description of the issue
I Want to Split More Than 25 Pages in Make (Integromat)
You’re trying to split a PDF with more than 25 pages in Make (formerly Integromat), but you’re hitting a limitation—only 25 output files are generated
Why This Happens
This issue occurs because of Make’s timeout limitation. When using the PDF.co Split a PDF module with the** “Download a File”** export type, only up to 25 output files are processed before the module times out.
How to Split More Than 25 Pages
To bypass this limitation, use the “JSON Output” export type instead of “Download a File”. This avoids the timeout constraint and provides you with direct URLs to all the split files, even when there are more than 25 pages.
Do This Instead:
In the Split a PDF module in Make:
- Go to the “Export Type” field.
- Select “JSON Output” (instead of “Download a File”). This method returns all file links in a single structured JSON response, effectively bypassing the 25-file limit.
Platform-Specific Related Resources
Helpful Tips
- Always use “JSON Output” if splitting more than 25 pages.
- For large PDFs, set
"async": true
and monitor job status.
Still Need Help? Contact Support
To help us assist you faster, please send us:
- What you’re trying to do
- Your platform (Make/Integromat, Zapier, API, etc.)
- Input files or links you’re working with
- Any error message or issue you’re seeing
- Screenshots or a brief explanation of what went wrong
I Want to Split a PDF by File Size
You need to split a large PDF into smaller parts based on file size—such as creating 10MB chunks from a 30MB file.
Why This Happens
The PDF.co /pdf/split endpoint does not split by file size directly. Instead, it splits by page range. To achieve size-based splitting, you first need to estimate the file size per page, then calculate how many pages to include in each chunk.
How to Split by File Size
To split a PDF into evenly sized chunks (e.g., 10MB parts), you’ll use the /pdf/split endpoint with calculated page ranges.
Step 1: Determine File Size per Page Split the first page of the PDF using the /pdf/split endpoint to estimate the size of a single page. This will help you figure out how many pages make up your target file size (e.g., 10MB).
Step 2: Define Page Ranges Based on Size Once you know the size per page, use it to define page groups. For example, if each page is ~1MB and your target is 10MB per file, group 10 pages per output file.
Example: Split a 30MB PDF into 3 parts of 10MB each
Use the /pdf/split endpoint with this input:
This will return three PDFs, each containing 10 pages and approximately 10MB in size.
Platform-Specific Related Resources
- Make/Integromat:Split Large PDF With Multiple Pages in Make
- Zapier: Split PDF by File Size
- Other Integrations: Contact us for guidance on specific platforms.
Helpful Tips
- Use
"pages": "*"
to split each page individually (useful for accurate sizing). - For large files, set
"async": true
and monitor job status. - Always check the actual size of the output files—some pages may vary in content size.
Still Need Help? Contact Support
To help us assist you faster, please send:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if any)
- A screenshot or brief description of the issue
I Want to Find and Remove Empty Pages from a PDF
You need to automatically detect and remove empty pages from a PDF—where an “empty page” means a page without any text content (even if it contains whitespace or images).
How to Remove Empty Pages
To remove empty pages, follow this step-by-step workflow:
Get the number of pages
- Use the /pdf/info endpoint to retrieve the total page count of the PDF.
Check each page for text
- Loop through each page.
- Call /pdf/convert/to/text-simple for every page. Evaluate the result: if the returned text is empty, mark the page as empty.
Remove empty pages
- Option 1: Use /pdf/edit/delete-pages to delete all identified empty pages in one call.
- Option 2: Use /pdf/split to split out the non-empty pages, then /pdf/merge to recombine them into a new PDF.
Example Workflow
Suppose your PDF has 10 pages:
- /pdf/info returns 10 pages.
- Loop pages 1–10 → call /pdf/convert/to/text-simple on each.
- If pages 3 and 7 are empty → pass “pages”: “3,7” to /pdf/edit/delete-pages. Result: new PDF with 8 pages (empty pages removed).
Helpful Tips
- This workflow detects empty text pages. It won’t detect image-only or scanned pages unless OCR is enabled.
- If dealing with scanned PDFs, use /pdf/makesearchable first to apply OCR, then run this process.
- Large PDFs? → Set “async”: true for long-running jobs and check job status.
Still Need Help? Contact Support
To help us assist you quickly, send us:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if any)
- A screenshot or brief description of what went wrong
Search and Delete
I Want to Fix Text Alignment When Replacing Text in a PDF
You need to replace text in a PDF, but the new text appears slightly misaligned—often sitting higher or lower than the original content.
How to Fix Text Alignment
To correct the alignment of replaced text, you’ll use a special parameter to adjust the vertical position:
- Use the /pdf/edit/replace-text endpoint to perform the replacement.
- Add the
YAdjustmentForReplacementText
setting in theprofiles
parameter to shift the text up or down.
Example: Move Replaced Text 1 Unit Up
Let’s say you want to replace “200.00” with “600.00” and adjust the new text slightly upward to align it better with the original text. Here’s how:
API Request
POST
/v1/pdf/edit/replace-text
This setting moves the replaced text 1 unit upward, improving alignment with the surrounding text.
Helpful Tips
- Use negative values (e.g.,
-1
) to move text up, and positive values to move it down. - Test a few values like
-0.5
,-1
, or+1
to find the best alignment for your document’s font and layout. - Always include the adjustment in the
profiles
field in JSON format.
Still Need Help? Contact Support
To speed up assistance, please send us:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Your input file or file URL
- Any error messages received
- A screenshot or short description of the issue
I Want to Replace Text in a PDF with Hebrew (Multilingual Support)
You’re trying to replace text in a PDF with a Hebrew (or other right-to-left language) string, but only the first word appears correctly. This can happen due to character encoding or rendering limitations in the PDF format.
How to Fix Text Replacement with Hebrew
To replace text successfully with Hebrew scripts, use this workaround:
Add a Space After the Hebrew Text
Due to the issue mentioned above, replacing text with multiple Hebrew words currently works only when a space is added at the end.
Example Fix:
If you’re replacing “Your Company Name” with the Hebrew phrase “אחת שתיים”, make sure to include a trailing space:
This will ensure the full phrase renders correctly in the output PDF.
Platform-Specific Related Resources
- Zapier Search and Replace PDF Text in Zapier
- Make Search and Replace PDF Text in Make/Integromat
- Other Integrations: Contact us for guidance on specific platforms.
Helpful Tips:
- Always test your output PDF when working with RTL or multilingual content.
- For better compatibility, make sure your Hebrew text is encoded in UTF-8.
Still Need Help? Contact Support
To help us assist you quickly, please share:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Sample input data or files
- Any error messages or unexpected behavior
What’s the Most Cost-Effective Way to Search for Text in PDFs?
You want to search for text across multiple PDF documents—but running a live text search inside PDFs every time is slow, resource-heavy, and costly. The best approach is to extract text once using PDF.co, then search against that extracted data in your own database or system.
Recommended Workflow
Here’s how you can build a cost-effective solution using PDF.co:
Extract text from PDFs with PDF.co
- Use /pdf/convert/to/text or /pdf/convert/to/text-simple endpoint.
- Run this once for each PDF.
- Optionally include page numbers if you need page-level references.
Store the extracted text outside PDF.co
- Save the extracted text in your own database or storage system.
- You control how to organize the data (by document, by page, etc.).
Search text using your own database or tools
- Run all search queries against your stored text—not directly in PDFs.
- This avoids repeatedly processing PDF files.
Why This Approach is Better
PDFs aren’t designed for direct text search—they’re designed for display, not querying. By extracting text once:
- You reduce API calls and credit usage on PDF.co
- You avoid repeated PDF processing for every search query
- You gain faster search speeds through your own database indexing
What PDF.co Provides
PDF.co provides the PDF to text extraction step only. The database storage, search engine, and interface for searching are handled on your side using your preferred tools or systems.
Example Use Case
- Extract text from 1,000 PDFs with /pdf/convert/to/text
- Save the text results in your SQL, NoSQL, or search engine database
- Add full-text search capability using your system (e.g., ElasticSearch, PostgreSQL, etc.)
- Every future search now queries your database—not the original PDFs—saving API credits and speeding up results.
Helpful Tips:
- If PDFs contain scanned images, enable OCR during extraction.
- Store page numbers alongside text if you need to reference exact locations.
- Batch extraction is recommended if processing large sets of PDFs.
Still Need Help? Contact Support
To assist you better, please include:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Sample documents or data
- Specific errors or results you’re seeing
- A screenshot or short description of the issue
I Want to Change the Font of Text in a PDF
You need to change the font of specific text in a PDF document—such as replacing plain text with styled text using a different font, size, or color.
How to Change Text Font
To change the font of existing text, you’ll use two steps:
- Delete the existing text.
- Add new text with your desired font settings.
Example: Change a Text’s Font Style
If you want to update a phrase like “Sample Text” to use Comic Sans MS with a larger font size and a different color:
Step 1: Remove the Old Text: Use the /pdf/edit/delete-text endpoint to remove the original phrase from the PDF.
Step 2: Add New Text with Your Chosen Font: Use the /pdf/edit/add endpoint to insert the new text.
Here’s a sample payload:
This example changes the text font to Comic Sans MS, sets the font size to 24, applies italic styling, and changes the color.
Helpful Tips
You can adjust font styles using: "fontName"
, "size"
, "color"
, "fontBold"
, "fontItalic"
options.
- Use page range
"pages": "0-"
to apply edits to all pages. - For precise text replacement, try combining with /pdf/find to locate exact positions.
Still Need Help? Contact Support
To help us assist you faster, please send us:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if you saw one)
- A screenshot or brief description of what went wrong
I Want to Search and Replace Text and Set Text Alignment
You need to replace existing text in a PDF and also set the alignment of the new text—such as centering a new address after replacing the old one.
How to Search, Replace, and Align Text
To achieve this, you’ll use two steps:
- Remove the unwanted text using the /pdf/edit/delete-text endpoint.
- Add the new aligned text using the /pdf/edit/add endpoint.
Example: Replace and Center Align Address (Zapier Automation)
PDF documents do not support traditional editable text or automatic alignment—each text element is placed at a fixed position on the page. Here’s how to replace and center-align a new address using Zapier:
Step 1: Delete Existing Text Use the PDF.co Custom API Call module in Zapier to call the /pdf/edit/delete-text endpoint. This allows you to precisely target and remove the original string you want to replace.
Step 2: Add New Text with Alignment Then use the PDF.co PDF Filler action to add the new text. To align it properly:
- Set the
width
of the text box to match the page width - Specify alignment as
center
,left
, orright
Example for center-aligned text on an A4 page (width = 842):
Helpful Tips
- Always specify the correct page width when aligning text.
- Use the same font size and style if you want to maintain visual consistency.
- Use coordinates and alignment settings carefully—PDFs don’t flow like Word docs.
Still Need Help? Contact Support
To help us assist you faster, please send us:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if you saw one)
- A screenshot or brief description of what went wrong
PDF Fill, Edit, Add
I Want to Avoid Text Overflow When Adding Text to PDFs
You’re trying to add text into a PDF but it gets cut off or extends beyond the page. This is known as text overflow, and it usually happens when the textbox size or alignment doesn’t properly fit the text you’re inserting.
How to Avoid Text Overflow
To prevent text overflow, you’ll need to use five key parameters:
x
andy
coordinates (to place the text)width
andheight
of the textbox (to define the area)- Text
alignment
(to control how text wraps within the box)
To find the right coordinates for positioning, you can use our PDF Inspector Tool.
API Example
To avoid overflow when using the /pdf/edit/add endpoint, set values like this:
This ensures the text fits nicely inside the defined box.
Platform-Specific Guide
-
Zapier
- Use the Text Objects field to define:
- Width:
133
- Height:
100
- Alignment:
left
- Example format:
- Width:
- Use the Text Objects field to define:
-
Make/Integromat
- In the Text Annotations section:
- Click Add Item
- Enter
width
,height
- Choose
alignment
- This prevents overflow by ensuring the text is correctly bound.
- In the Text Annotations section:
Helpful Tips
- Set adequate height if your text is long.
- Use small font sizes (like
7-12
) to fit more content within limited space.
Still Need Help? Contact Support
Send us the following to help us assist you faster:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if any)
- A screenshot or short description of the issue
I Want to Rename PDFs Using Extracted Text
You want to rename one or multiple PDF documents—such as naming each PDF based on a unique reference number or identifier extracted from within the document itself.
Why It Happens
PDFs often lack meaningful file names, making them hard to organize. If your documents include internal identifiers (like reference numbers or invoice codes), you may want to use those to rename each file automatically for easier tracking and sorting.
How to Rename PDF Files Using Extracted Text
To rename PDF files based on text inside them, you’ll use two steps:
- Extract the text (e.g., a reference number) from the document.
- Rename the PDF using that extracted value.
Example: Rename a PDF Using a Reference Number
Let’s say you receive PDF forms and want to name each file using the reference number shown on the first page.
Step 1 – Extract the Reference Number:
Use the /pdf/documentparser endpoint with a custom template:
- Create a template using the Document Parser Online Template Editor. Our walkthrough video shows you how to use the Document Parser Online Template Editor.
- Use the template to extract the unique identifier (like a ref. number).
Step 2 – Rename the File:
Use the /pdf/edit/add endpoint to rename the PDF:
- Pass in the original file URL.
- Set the output file name using the identifier from Step 1.
Platform-Specific Guide
-
Zapier
- Create a Document Parser template.
- Add the PDF.co Document Parser action.
- Input the PDF URL and Template ID.
- Extract the identifier (e.g., reference number).
- Follow this tutorial to rename the file:
-
Make/Integromat
- Create a Document Parser template.
- Add the Parse a Document module.
- Input the PDF URL and Template ID.
- Run the module to extract the identifier.
- Follow this tutorial to rename the file:
Helpful Tips
- You can test your Document Parser templates in the online editor before use.
- Make sure your reference number or identifier is clearly placed and consistently formatted.
- Combine with filters or conditions to rename only specific PDFs.
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- A sample input file or PDF URL
- The template you’re using
- Any errors or unexpected output (if any)
How to Add Text to a PDF and Email It to a Customer
You want to add content (like text or images) to a PDF and then email the updated PDF to your customer.
This process involves two steps:
- Add text/images to the PDF
- Send the updated PDF via email
Let’s go through it:
Step 1: Add Text or Images to the PDF
Use the /pdf/edit/add endpoint to:
- Add text (like names, notes).
- Insert images (like logos, signature).
- Add hyperlinks.
- Fill out a PDF form.
API Docs: Add Text & Images | Fill PDF Form
Step 2: Send the Final PDF via Email
Use the /email/send API to email the updated PDF file.
API Docs: Send Email
Platform-Specific Setup
Zapier
- To achieve this on Zapier, you will be required to configure two PDF.co actions.
- The first action is PDF.co PDF Filler.
- If you have a standard PDF, you can refer to this tutorial for guidance: https://pdf.co/add-text-and-images-with-links-to-a-pdf-using-zapier
- If you have a fillable PDF form, you’ll find this tutorial helpful: https://pdf.co/how-to-fill-pdf-forms-using-zapier
- The second action you need to configure is PDF.co Send Email.
- To use our /email/send endpoint, you can follow the Zapier integration guide for step-by-step instructions on how to set it up. Zapier Integration Guide
- Alternatively, if you are a Gmail / Google Mail user and would like to utilize the Gmail plugin, you can take a look at our available guide here Generate PDF from Jotform
Make/Integromat
- To accomplish this task on Integromat/Make, you will need to set up two PDF.co modules.
- The first module can be either PDF.co Add Text and Image to PDF or PDF.co Fill a Form.
- If you need to fill out a PDF form, you can refer to this comprehensive guide: https://pdf.co/fill-w9-form-using-pdfco-and-integromat.
- The second module that you need to set up is the PDF.co Send Email with Attachments.
- To use our /email/send endpoint, jump to step 9 in this guide https://pdf.co/tutorials/send-emails-with-pdf-data-using-make
- If you’re a Gmail / Google Mail user, you can use this guide to send the PDF output to your customer’s email address using the Gmail plugin: https://pdf.co/send-emails-from-gmail-with-data-from-pdfs-integromat#4.
For Developers
If you’re working directly with the API:
- For adding text, images, links, and filling out PDF forms, you can refer to the following documentation and code samples:
- Fill PDF Form: Fill PDF Form
- Add Text, Images, Signature, Links to PDF: Add Text, Images, Signature, Links to PDF
- To send an email with an attachment, you can consult the following documentation and code samples:
- Send Email to Customer Email Address: Send Email to Customer Email Address
- How to set up SMTP for email via GMAIL: How to set up SMTP for email via GMAIL
Helpful Tips
- If you’re using Zapier or Make, PDF.co handles both steps seamlessly.
- You can include custom sender names or subjects using
email/send
parameters. - Always test with sample data before going live.
Still Need Help? Contact Support
To help us assist you faster, please send us:
- What you’re trying to do
- Your platform (Zapier, Make, API, etc.)
- Any sample files or URLs
- The exact error message (if any)
- A brief description or screenshot of the issue
I Want to Set Width and Height for an Image in Zapier (Without a Clickable Link)
You’re trying to insert an image into a PDF using Zapier and want to define the image’s width and height—but you don’t want the image to include a clickable hyperlink.
Why This Happens
When adding an image to a PDF using Zapier (or when using the simplified input format), the image link format expects all parameters to be present, including the clickable URL. If you omit the clickable link entirely, the system may misread the formatting or fail to apply the image correctly.
How to Add the Image Without a Clickable Link
To handle this, you’ll still include the clickable link parameter, but simply leave it empty. All parameters must be present—even if you’re not using all of them.
Example: Remove Clickable Link While Setting Width and Height
Instead of using:
Use:
This keeps the formatting correct, applies the width and height, and removes the clickable link from the image.
Helpful Tips
- Always include all parameters in your format, even if some are empty.
- Separate values with
;
as shown in the example.
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (Zapier, API, etc.)
- Any sample data or input files
- A screenshot or error message (if any)