Getting Started with PDFDancer
PDFDancer edits text, pages, images, vector graphics, and form fields in existing PDF files. The Python, TypeScript, and Java SDKs use the same workflow: open a PDF, make a change, inspect the operation result, and save the edited file.
Choose your SDK
- Python — Python 3.10 or newer
- TypeScript — Node.js 20 or newer
- Java — Java 17 or newer
All page numbers passed to v2 SDK methods are one-based. PDF coordinates are measured in points, normally from the bottom-left corner of the page.
How editing works
- Open an existing PDF or create a new document.
- Work with the whole document (
pdf) or one page (pdf.page(1)). - Select an existing object, or identify the text to change.
- Check the returned result, warnings, and errors.
- Save to a file or retrieve the current PDF as bytes.
Start with the quickstart for your language. Each quickstart uses the same downloadable PDF and works without creating an account.
Authentication
When no credential is supplied, the SDK requests a temporary anonymous token. Anonymous output is watermarked. For production, create an account and configure PDFDANCER_API_TOKEN. See Authentication.
Where to go next
- Find and edit text
- Add or transform images
- Create and reorder pages
- Work with PDF coordinates
- Handle failures in production
Upgrading an existing integration? See Migrating from API v1. The complete v1 documentation remains available under /v1/.