The real “PDF generation” problem: assembling reusable parts
Most teams don’t struggle because they can’t create a PDF. They struggle because they need to reliably assemble a final packet from multiple reusable pieces—over and over again—without someone manually stitching files together.
Common examples include:
- A generated quote plus a standardized cover page
- A report plus a bundle of appendices
- An invoice plus your Terms & Conditions PDF
- A contract plus exhibits and schedules
This is where Zoho PDF Editor’s Insert Pages from PDF API fits: it lets you insert an entire source PDF into an existing PDF at a chosen page location, either before or after the page number you specify. (Zoho)
Why inserting pages beats re-rendering everything
Re-rendering PDFs from different systems (billing, proposal tools, file repositories, internal generators) into one “master” document can be fragile. Even when it works, it often increases complexity.
In practice, inserting one PDF into another is frequently:
- Easier to implement than rebuilding a full rendering pipeline
- Faster to ship because it’s a single operation instead of multiple transforms
- More consistent because your reusable PDFs (like T&Cs) stay identical across every output
And in a business setting, “consistent and repeatable” is usually the most valuable feature you can ship.
What’s changed from “before” to today
Zoho PDF Editor has evolved quickly. Earlier workflows were commonly UI-first, manual assembly-first. Zoho’s timeline shows the product’s rollout and then the introduction of dedicated REST APIs for PDF editing/manipulation in May 2025. (Zoho)
Before: automation meant “insert, then download”
Originally, the most straightforward automated pattern looked like this:
- Upload or reference two PDFs
- Call the Insert Pages endpoint
- Poll a job URL until completion
- Download the merged output via a download link
That pattern still exists—and it’s still useful—but it was primarily geared toward “get me the combined file now.” (Zoho)
Today: automation includes “insert, then store and share”
The major upgrade is that Zoho now supports a store-first workflow through an “Insert Pages and Store” endpoint that saves the resulting PDF into Zoho WorkDrive. This changes the role of the API from a one-off file operation into a building block for document pipelines. (Zoho)
LOOKING FOR A ONE-STOP SOLUTION TO YOUR GROWTH NEEDS?
At the same time, Zoho frames PDF Editor as a broader suite: insert images, combine pages, extract/split/replace/rotate/delete pages, apply watermarks, and add page numbers—often with choices to return instantly or store securely. (Zoho)
The workflow pattern that works in production
A stable PDF assembly workflow usually has four stages:
Gather inputs
You will typically need:
- original_file: your base PDF (often generated dynamically, like an invoice)
- source_file: your reusable insert (cover page, T&Cs, appendix bundle) (Zoho)
Zoho allows these to be provided as:
- A file upload, or
- A publicly accessible URL string (Zoho)
Choose insertion rules
Insertion rules are usually business rules written in plain language, such as:
- “Insert the cover page before page 1”
- “Insert Terms after page 1”
- “Insert appendices at the end” (commonly implemented as “after the last page”)
- “Insert signature pages before the final page”
Zoho’s API supports two key controls:
page_number(the anchor page)position(beforeorafter) (Zoho)
Submit the job
Zoho’s Insert Pages endpoint follows this format:https://{zohoapis_domain}/pdfeditor/api/v1/pdf/pages/insert (Zoho)
Zoho also emphasizes using your region-specific API domain and lists a base endpoint structure for PDF Editor APIs. (Zoho)
Monitor status and retrieve output
Insert Pages is job-based (asynchronous). Your initial response includes a status-check URL and a status such as “inprogress.” When complete, you receive a download_url (for the download version) and a success status. (Zoho)
The foundation: endpoints, regions, and authentication
Before you assemble anything, two details determine whether your workflow will run smoothly.
Use the correct regional API domain
Zoho requires a domain-specific endpoint for your region and provides a base API endpoint pattern for PDF Editor REST APIs. (Zoho)
That matters because a perfectly formed request can still fail if it’s sent to the wrong regional domain.
Use the required OAuth scope
Zoho states that Insert Pages uses an OAuth token with scope:
ZohoWriter.pdfEditor.ALL(Zoho)
You pass it in the header as:
Authorization: Zoho-oauthtoken <token>(Zoho)
Building the “Invoice + Terms” packet (classic assembly example)
Here’s a simple, high-value pattern many finance teams want:
Goal: Insert Terms.pdf into an invoice after page 1.
original_file:Invoice_10492.pdfsource_file:Terms.pdfinput_options:{ "page_number": 1, "position": "after" }(Zoho)output_settings:{ "name": "Invoice_10492_With_Terms.pdf" }(Zoho)
This approach keeps your legal PDF standardized while letting invoices remain dynamically generated.
A clean cURL request you can use as a baseline
Below is a practical request structure consistent with Zoho’s Insert Pages documentation (multipart form-data with input and output JSON). (Zoho)
curl --location --request POST "https://www.zohoapis.com/pdfeditor/api/v1/pdf/pages/insert" \
--header "Authorization: Zoho-oauthtoken YOUR_TOKEN_HERE" \
--form 'original_file=@"/path/to/Invoice_10492.pdf"' \
--form 'source_file=@"/path/to/Terms.pdf"' \
--form 'input_options={"page_number":1,"position":"after"}' \
--form 'output_settings={"name":"Invoice_10492_With_Terms.pdf"}'
Minimal Python polling skeleton (and how to make it production-ready)
The logic is simple:
- POST the job
- Read
status_check_url - Poll until status is
success - Download the result
Zoho’s response structure explicitly supports this job/poll pattern. (Zoho)
import time
import requests
TOKEN = "YOUR_TOKEN"
BASE = "https://www.zohoapis.com" # replace with your region domain
INSERT_URL = f"{BASE}/pdfeditor/api/v1/pdf/pages/insert"
headers = {"Authorization": f"Zoho-oauthtoken {TOKEN}"}
files = {
"original_file": open("Invoice_10492.pdf", "rb"),
"source_file": open("Terms.pdf", "rb"),
}
data = {
"input_options": '{"page_number":1,"position":"after"}',
"output_settings": '{"name":"Invoice_10492_With_Terms.pdf"}',
}
job_resp = requests.post(INSERT_URL, headers=headers, files=files, data=data).json()
status_url = job_resp["status_check_url"]
# Simple polling loop (add backoff + timeout for production use)
for _ in range(60):
status_resp = requests.get(status_url, headers=headers).json()
if status_resp.get("status") == "success":
download_url = status_resp["download_url"]
pdf_bytes = requests.get(download_url, headers=headers).content
with open("final.pdf", "wb") as f:
f.write(pdf_bytes)
break
time.sleep(2)
Make this safe for production
A “works once” script becomes a production workflow when you add:
- Timeouts so a stuck job doesn’t hang forever
- Exponential backoff (poll less aggressively over time)
- Retry rules for transient network failures
- Logging so you can replay failed jobs cleanly
- Idempotency thinking (if the same job is triggered twice, what happens?)
Zoho’s model encourages polling status_check_url, so building robust polling is part of doing this well. (Zoho)
Operational constraints you must design around
Even well-designed assembly workflows break if you ignore two constraints.
File size limits
Zoho’s Insert Pages documentation specifies a maximum file size of 50 MB for both the original and source PDFs. (Zoho)
If your appendices are large, plan for:
- Compression upstream
- Splitting appendices into smaller PDFs
- Multi-step assembly (insert in stages)
URLs must be publicly accessible
If you pass a URL string rather than uploading a file, that URL must be publicly accessible per Zoho’s parameter definitions. (Zoho)
If your PDFs live behind authentication, file upload is usually the simplest approach, or you’ll need a secure pre-signed URL strategy.
The biggest “today” upgrade: Insert Pages and Store (WorkDrive workflows)
This is where the modern workflow diverges from older implementations.
Instead of returning a download link, Zoho provides an endpoint to insert pages and store the result:
https://{zohoapis_domain}/pdfeditor/api/v1/pdf/pages/insert/store (Zoho)
Why storing the output changes everything
For many teams, the “final PDF” isn’t meant to be downloaded once and forgotten. It’s meant to be:
- Stored in a shared workspace
- Linked in a CRM record
- Sent to a client portal
- Reviewed internally
- Used as a canonical artifact for audit and compliance
The store endpoint returns WorkDrive-specific identifiers like document_url and document_id while the job is running, and confirms success with the same fields when complete. (Zoho)
Additional scopes required
The store version requires WorkDrive scopes in addition to the PDF Editor scope:
ZohoWriter.pdfEditor.ALLWorkDrive.organization.ALLWorkDrive.files.ALL(Zoho)
This is a key “before vs today” difference: earlier guidance often stopped at “download the output.” Today, Zoho supports a more enterprise-friendly “create it and keep it managed” approach.
Output settings evolve in the store version
Zoho’s store endpoint introduces output settings such as:
folder_id- optional overwrite behavior (Zoho)
That enables repeatable pipelines like:
- “Always write the latest customer packet into this WorkDrive folder”
- “Overwrite the previous version if it exists”
Where this approach shines
Once you implement Insert Pages as an assembly primitive, you unlock repeatable document packaging in several areas.
Standardized inserts at scale
Cover sheets, policy PDFs, legal terms, brand pages—these are the best candidates because they change infrequently and must remain consistent everywhere.
Multi-step document assembly
Many real packets are built in phases:
- Proposal → add appendix → add signature pages
- Report → add definitions → add methodology appendix → watermark → protect
Zoho’s broader PDF API suite is designed for these kinds of chained operations, not just a single insert step. (Zoho)
Client portals and email delivery
“Packaged PDFs” are the currency of operations: billing emails, onboarding links, legal bundles, compliance submissions. The insert workflow is a clean way to generate those packages automatically—especially when combined with the store option for WorkDrive-based sharing. (Zoho)
What to implement first (practical roadmap)
If you’re building this today, this sequence tends to work best:
Start with the download-based insert
Use /pdf/pages/insert first. It’s the simplest way to validate:
- authentication
- regional domain
- insertion rules
- polling logic
- output correctness (Zoho)
Add “store” once you need durable outputs
When stakeholders start asking, “Where does the final PDF live?” or “Can we share it without emailing attachments?” move to /insert/store and store results in WorkDrive. (Zoho)
Expand into a pipeline if your packets require more than insertion
Once you’re assembling reliably, you can layer in:
- page numbering
- watermarks
- splitting and extraction for downstream routing
- password protection for sensitive documents (Zoho)
Closing perspective: the workflow matured, not just the endpoint
The Insert Pages approach started as a way to avoid manual PDF assembly—and it still excels at that. But today, it’s more than a convenience endpoint.
What’s changed is the shape of the workflow:
- Before: Insert → poll → download (good for one-off output delivery) (Zoho)
- Today: Insert → poll → store in WorkDrive (better for managed, shareable, auditable document pipelines) (Zoho)
If your business produces repeatable packets—cover pages, terms, appendices—this is one of the quickest ways to turn “PDF chaos” into a predictable, automated system that scales.
© Image credits to Steve Johnson
