Why teams still need “delete pages” automation in 2026
PDFs are everywhere, and they’re still messy. Even with modern document systems, real-world PDFs arrive with cover sheets, blank scans, separator pages, internal notes, or signature pages that should not move forward in a workflow. When humans clean PDFs manually, the process is slow and inconsistent—and it’s easy to miss a page, delete the wrong one, or accidentally ship internal content to a client.
Zoho PDF Editor’s Delete Pages from PDF API is built for a very practical goal: remove specific pages (single pages or ranges) from a PDF document programmatically so your application can output a cleaner, smaller, more accurate file every time.
What’s changed since earlier guides and “quick summaries”
If you’ve seen older internal notes or short explainers about this endpoint, the way Zoho documents the feature today is clearer and more implementation-friendly. The core purpose hasn’t changed, but the current guidance better reflects how real integrations should be built and maintained.
The request structure is now described more explicitly
Older summaries often described page deletion in plain language—“pass a range like 1–3” or “use 1–4,8,10.” Today’s documentation makes it easier to translate that idea into code by describing an input_options payload that includes a page_ranges setting, along with examples that mix page ranges and individual page numbers.
The asynchronous job workflow is clearly emphasized
Many older integrations assume a file operation might return a finished PDF immediately. The current documentation emphasizes that deletion runs as an asynchronous scheduled job: you start the request, receive a status-check value, and only after completion do you receive an output download value. This matters in production because it changes how you design timeouts, retries, user feedback, and logging.
Limits and prerequisites are highlighted as “must-know” constraints
The documentation now makes constraints hard to overlook: there’s a maximum input file size, a maximum number of pages, and a required OAuth scope. These constraints should be enforced in your application before calling the API so users don’t experience avoidable failures.
Regional data-center domains are treated as a real requirement
Instead of implying there’s one universal base domain, Zoho stresses that you must use the correct data-center domain for your account (for example, different regions have different API base domains). This impacts configuration and deployment across environments.
What the Delete Pages API does
At its simplest, this API removes pages you specify from a PDF document and produces a modified PDF you can download.
The detail that matters: this is not a “return the final file immediately” call. It runs as a job.
The job-based workflow in plain terms
You:
LOOKING FOR A ONE-STOP SOLUTION TO YOUR GROWTH NEEDS?
- Send the PDF plus instructions (which pages to delete, and what to name the output).
- Receive a status-check value while the job is running.
- Poll the status-check value until the job finishes.
- Download the final PDF from a download value once the status indicates success.
This structure is especially useful for larger PDFs or high-throughput systems because it avoids fragile, long-running requests.
When to use it in real workflows
Most teams adopt this endpoint for one of three reasons: client safety, compliance, or operational speed.
Client-facing exports
When exporting PDFs to clients, you often need to remove pages that should never leave your organization, such as:
- Draft pages
- Internal pricing notes
- Staff-only annotations
- Appendices that aren’t part of the final deliverable
Automating deletion ensures the same rules are applied every time, regardless of who runs the export.
Compliance and sensitive content handling
Compliance workflows frequently require removing pages containing sensitive attachments or internal disclosures before archiving or external distribution. A repeatable API step is easier to audit than manual review because your system can record which pages were removed and why.
Scanning and ingestion cleanup
In scanning workflows, it’s common to end up with:
- Blank pages
- Separator pages
- Duplicates caused by scanning quirks
Automatically removing known “junk pages” before storage keeps your repository cleaner, reduces downstream processing costs, and prevents confusion when users open a document later.
Endpoint, authentication, and core constraints
This is where integrations commonly break: using the wrong base domain, missing the required OAuth scope, or sending an input PDF that exceeds the service limits.
Endpoint location
Zoho provides the endpoint under the PDF Editor API path:
/pdfeditor/api/v1/pdf/pages/delete
Your application must combine this path with the correct base domain for your Zoho data center.
OAuth scope requirement
Your OAuth token must include the scope:
ZohoWriter.pdfEditor.ALL
If you see authorization failures, confirm that your token includes this scope and that the token is valid and unexpired.
Input limits you should enforce before calling
Zoho enforces constraints on the input PDF:
- Maximum file size: 50 MB
- Maximum length: 150 pages
In production, validate these constraints before you call the API. If your users frequently handle large PDFs, consider building a fallback route (like splitting PDFs upstream) so the workflow doesn’t dead-end.
How you provide the PDF file
Zoho supports two common ways to provide the input PDF through the same file parameter.
Upload a file directly
This is the most common approach for server-to-server integrations. You send the PDF as a multipart form upload along with other parameters.
Provide a publicly accessible URL
If your PDF is hosted online and accessible via a public URL, you can pass that URL in the same file parameter instead of uploading the file content.
This is convenient, but it’s also a security and reliability decision:
- If the URL is truly public, anyone with the link might access the document.
- If the URL requires authentication, the service may not be able to retrieve it.
- If the link expires quickly, the job may fail during processing.
If you must use URLs, many teams prefer short-lived signed links that remain valid long enough to fetch the document, but not long enough to be broadly reusable.
How to tell the API which pages to delete
The key instruction lives inside input_options, under page_ranges.
Zoho’s examples show that page_ranges can include:
- Ranges (like “1-5”)
- Individual pages (like 8 and 10)
- A mixed list containing both
Practical examples you can map to user intent
These are the same patterns users naturally ask for:
- “Remove page 2” → delete
2 - “Remove pages 1 through 3” → delete
1-3 - “Remove 1–4, also 8 and 10” → delete
1-4, 8, 10
A serialization detail to standardize in your app
Depending on how you send multipart form fields, you may represent page_ranges as:
- An array (recommended internally for parsing and validation), then serialized into JSON
- A comma-separated string inside the JSON form field (still valid if your JSON parser and backend accept it consistently)
Best practice: normalize user input into a single internal representation (for example, an array of ranges and integers), validate it, and serialize consistently when you create the request.
Naming your output file
Zoho supports an output_settings object where you can specify the output PDF name via output_settings.name.
This is a small feature with big operational value. Naming the output deterministically helps with traceability and support. A good naming scheme can link the processed PDF back to:
- The original filename
- The user or system action that initiated the job
- The rule set applied (client export, compliance cleanup, archive normalization)
Example naming patterns:
OriginalName_cleaned.pdfCase_12345_client-copy.pdfInvoice_7788_remove-coversheet.pdf
Pick something consistent so both users and logs stay readable.
The full lifecycle: request, status polling, download
This endpoint works best when you treat it as a reliable, observable job pipeline rather than a one-shot file edit.
Start the job
A typical request is a multipart POST including:
file(uploaded PDF or a public URL)output_settings(JSON string includingname)input_options(JSON string includingpage_ranges)
Example request shape (no base URL shown):
curl --request POST "<delete-pages-endpoint>" \
--header "Authorization: Zoho-oauthtoken YOUR_TOKEN" \
--form 'file=@"/path/to/Sample.pdf"' \
--form 'output_settings={"name":"ModifiedFile.pdf"}' \
--form 'input_options={"page_ranges":"1-4,8,10"}'
The exact shell quoting can vary by environment, but the structure should remain: file + output settings + input options.
Receive a status-check value
The initial response indicates the job is in progress and includes a status-check value you call to monitor the scheduled job.
A representative response shape looks like:
{
"status_check_url": "<status-check-value>",
"status": "inprogress"
}
Poll until completion
Your application should poll the status-check value until the job finishes.
A production-friendly polling strategy:
- Start quickly (for example, after 1–2 seconds)
- Back off gradually to reduce unnecessary traffic (exponential or staged backoff)
- Use a maximum total wait time
- Record each poll response in logs for troubleshooting
Download the final PDF
When the job completes successfully, you receive a download value.
A representative success response shape looks like:
{
"download_url": "<download-value>",
"status": "success"
}
Then your system retrieves the modified PDF and continues the workflow (save it, attach it, deliver it to a portal, store in DMS, etc.).
Production best practices (the parts that prevent support tickets)
The official docs show the “happy path.” Real systems need guardrails around input validation, user intent, and operational reliability.
Validate page ranges against the real page count
Even though the API accepts ranges and individual pages, your application should verify:
- Page numbers start at 1 (typical user expectation)
- No page number exceeds the document’s page count
- No invalid ranges (like “5-2”)
- Optional: consolidate duplicates or overlapping ranges for clarity
If users are typing page ranges, build a parser that normalizes:
- Extra spaces
- Mixed separators
- Overlapping selections
Then store the normalized result for auditing.
Treat URL input as a security decision
Because the file parameter can accept a public URL, decide in advance:
- Which workflows allow URL-based input
- Whether documents may contain sensitive data
- How long links should remain valid
- Whether access should be restricted via signed URLs
When teams skip this decision, it often becomes a security scramble later.
Make async jobs observable
Since the process is job-based, always log:
- When the request was started
- Who initiated it (user or system)
- The page deletion request (normalized format)
- The status transitions
- The completion time
- Whether the output was downloaded and stored successfully
This makes troubleshooting fast when someone says, “My PDF didn’t change,” or “The wrong pages were removed.”
Define what “success” means in your product
A “success” status means the job completed and an output can be downloaded. Your product may still want basic validation:
- The downloaded file is non-empty
- The output opens successfully in your viewer
- The resulting page count matches expectations
One or two lightweight checks can prevent downstream failures.
Troubleshooting checklist for common integration issues
Most failures fall into a few predictable categories.
Authorization errors
- Confirm the OAuth token includes the required scope:
ZohoWriter.pdfEditor.ALL - Confirm you are using the correct data-center base domain for the account
Input rejected
- Ensure the PDF is within the size and page limits (50 MB and 150 pages)
- If using URL input, confirm the URL is truly accessible from outside your environment
Job doesn’t complete
- Implement backoff polling instead of constant polling
- Add a timeout and present a clear retry path
- Log the polling responses to spot patterns
Wrong pages removed
This usually comes from parsing problems:
- Normalize page range input
- Confirm your UI and logic match user expectations (page 1 is the first page)
- Store the normalized deletion set so you can explain outcomes later
How to position this API in a larger PDF workflow
Page deletion is often just one step in a longer pipeline. These patterns are common and effective:
Clean then distribute
- Receive PDF (upload or URL)
- Delete unwanted pages
- Distribute the cleaned PDF (portal, client folder, email attachment)
- Archive with metadata
Ingest then normalize
- Ingest bulk scans
- Delete separators/blanks
- Run extraction/classification on the cleaned file
- Store and index for search
Rule-based export variants
- User selects export type (client copy, internal copy, compliance copy)
- Your system maps export type → page deletion rules
- The API produces the correct variant automatically
- User downloads or shares the right version
These approaches reduce manual effort and standardize document outputs—especially helpful when PDFs flow through regulated or customer-facing processes.
Implementation checklist
Before calling the API
- Confirm the correct base domain for the account’s data center
- Ensure OAuth token includes
ZohoWriter.pdfEditor.ALL - Validate PDF size ≤ 50 MB and pages ≤ 150
- Normalize and validate page ranges
During processing
- Start the job with
file,input_options, andoutput_settings - Store the returned status-check value
- Poll with backoff until status indicates success
After success
- Retrieve the file from the download value
- Optionally validate the output
- Continue the workflow (save/share/archive)
Closing thoughts
The value of the Delete Pages API is straightforward: it replaces manual PDF cleanup with a repeatable, auditable, scalable step in your workflow. What’s more important today than in earlier, shorter guides is treating the process as a job lifecycle—with validation, status polling, logging, and predictable output handling. Do that well, and “remove pages from PDFs” becomes a dependable background operation instead of a recurring support problem.
© Image credits to Steve Johnson
