Edit PDF API
Edit PDF content programmatically without Adobe or manual tools. Add text overlays, fill form fields, insert annotations, and customize documents at scale. Perfect for SaaS products that generate invoices, contracts, or reports. Combine with our watermarking API for complete document control.
No credit card required • Free tier available
Edit PDF API Example
REST APIcurl -X POST "https://api.xspdf.com/v1/manipulate/edit" \
-H "Authorization: Bearer $API_KEY" \
-d '{"input_url":"https://files.example.com/template.pdf","operations":[{"type":"add_text","text":"John Doe","x":100,"y":200,"page":1,"font_size":12},{"type":"add_annotation","text":"Review needed","page":2}]}' Speed
340ms
Success
99.95%
Options
15+
8,700+
Active Teams
340ms
Median Latency
99.95%
Success Rate
120M+
Edits Performed
Editing PDFs Shouldn't Require Adobe Licenses
SaaS products need to fill forms, add text overlays, and customize documents automatically. Desktop tools don't scale. Manual editing breaks workflows.
Manual Form Filling Wastes Time
Your team spends hours filling PDF forms manually. Customer data already exists in your database, but someone still types it into each document. No automation, no scaling.
Desktop Tools Don't Scale
Adobe Acrobat costs $180/user/year. You need licenses for everyone who edits documents. It requires manual intervention and can't be automated. Batch processing is impossible.
No Developer-Friendly Options
You need to add customer names to invoices, fill contract templates, or overlay tracking numbers on shipping labels. Existing PDF libraries are complex, poorly documented, and require weeks to integrate.
The Hidden Cost of Manual PDF Editing
A 10-person operations team spending 3 hours daily on PDF form filling costs $78,000 annually in labor. Add Adobe licenses ($1,800/year), correction time for data entry errors, and delayed shipments from slow processing. Total annual cost: $95,000+.
xspdf automates all PDF editing for $149/month. Fill 10,000 forms per month programmatically. ROI in the first week.
Edit Any PDF in One API Call
Add text, fill form fields, insert annotations, and customize documents programmatically. No Adobe licenses, no manual work, no complex PDF libraries.
Add Text Anywhere
Place text overlays at specific X/Y coordinates. Customize font, size, color, alignment. Perfect for adding customer names, dates, tracking numbers, or custom labels to existing PDFs.
Fill Form Fields Automatically
Detect and fill all PDF form fields by name. Map your database fields directly to PDF forms. Fill hundreds of forms in seconds with customer data from your CRM or database.
Insert Annotations & Comments
Add sticky notes, highlights, and comments programmatically. Perfect for review workflows, approval processes, or adding instructions to documents before sending.
Python SDK Example
pip install xspdfresponse = requests.post(
"https://api.xspdf.com/v1/manipulate/edit",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"input_url": "https://files.example.com/template.pdf",
"operations": [
{"type": "add_text", "text": "John Doe", "x": 100, "y": 200, "page": 1, "font_size": 12},
{"type": "fill_field", "field_name": "signature_date", "value": "2026-01-15"}
]
}
)
edited_url = response.json()["output_url"] Response in 340ms
{
"output_url": "https://files.xspdf.com/edited.pdf",
"operations_applied": 2,
"pages_modified": 1
} Every PDF Editing Operation You Need
From simple text overlays to complex form filling, handle any PDF editing task programmatically.
Text Overlay
Add text at precise X/Y coordinates. Customize font family, size, color, weight, alignment. Supports Unicode characters and multi-line text with line height control.
Form Field Filling
Automatically detect and fill all form fields by name. Supports text fields, checkboxes, radio buttons, dropdowns. Flatten forms after filling to prevent editing.
Annotations
Add sticky notes, highlights, underlines, and strikethroughs programmatically. Perfect for review workflows. Set author, color, and timestamp for each annotation.
Checkbox Control
Check or uncheck PDF checkboxes by field name. Perfect for terms acceptance, feature selection, or option forms. Works with AcroForms and XFA forms.
Batch Operations
Apply multiple edits in a single API call. Add text, fill fields, and insert annotations together. Process thousands of documents with consistent edits via batch endpoint.
Field Detection
API automatically detects all fillable fields in your PDF. Returns field names, types, and current values. Makes form filling simple even for complex documents.
Frequently Asked Questions
Everything you need to know about editing PDFs programmatically.
Can I fill PDF forms without knowing field names?
Yes. First call our field detection endpoint: POST /v1/extract/form-fields with your PDF. It returns all field names, types, and current values. Then use those field names in your edit request. Works with any PDF form.
How do I position text at exact coordinates?
Use the x and y parameters in your add_text operation. Coordinates are in points (1/72 inch) from the bottom-left corner. For example, x: 100, y: 500 places text ~1.4 inches from left and ~7 inches from bottom. We also support percentage-based positioning.
Can I apply multiple edits in one API call?
Yes. The operations array accepts multiple operations. Add text, fill fields, insert annotations all in one request. The API processes operations in order and returns a single edited PDF. Faster and cheaper than making multiple API calls.
Does editing preserve the original PDF quality?
Yes. We never re-render or rasterize your PDFs. Text, vector graphics, and images remain as vectors. We layer your edits on top of the original content. The output PDF maintains the same quality and file structure as the input.
Can I flatten forms after filling to prevent further edits?
Yes. Add "flatten": true to your options. This converts all form fields to static text after filling, preventing further edits. Perfect for finalized documents, compliance records, or when you want to prevent recipients from modifying filled data.
Start Editing PDFs Programmatically Today
Free tier includes 100 operations per month. No credit card required. Upgrade anytime as you scale.
Related APIs