Edit Finished PDFs in Node.js Without Rebuilding the Layout
Change real text inside exported PDFs while preserving fonts, spacing, and styling. Built for contracts, marketing collateral, books, and other documents you need to update after export.
Install the SDK and run the examples locally before creating an account.
Real Text Editing
What makes this real text editing, not overlays?
PDFs do not store text like a document editor. They store positioned glyphs and drawing instructions. PDFDancer reconstructs words, lines, paragraphs, and fragments so your Node.js code can select content by meaning, edit the existing PDF content, and save a document that still matches the original layout and styling instead of covering it with new text.
What this example shows
Why It Holds Up
Reliable editing for post-export document work
What developers need
- Edit finished PDFs without reopening the source file
- Preserve fonts, spacing, alignment, and inline styling
- Select text by structure or pattern instead of box coordinates
- Use the same SDK in scripts, APIs, workers, and serverless jobs
What PDFDancer gives you
- Semantic reconstruction of words, lines, paragraphs, and fragments
- Paragraph-centric text reflow for longer or shorter replacements
- Three reflow modes: BEST_EFFORT, FIT_OR_FAIL, and NONE
- Official TypeScript, Python, and Java SDKs for the same editing model
Examples
Three Node.js workflows you can run today
Replace paragraph text with strict layout control
Use FIT_OR_FAIL when you need the edit to respect the original layout bounds and reject replacements that would overflow.
Apply batch replacements to a finished template
Use applyReplacements() when the document already contains placeholders or fixed text targets you need to swap in one pass.
Process uploaded PDFs in an Express route
The same editing model works in backend handlers. Open the uploaded file, change the target text, save the result, and return the edited PDF.
Evaluation
What to know before you integrate it
Editing model
Select and edit text lines, paragraphs, and fragments inside existing PDFs.
Reflow options
BEST_EFFORT auto-fits, FIT_OR_FAIL stays strict, and NONE keeps fitting manual.
Runtime fit
Use the same package in Express, Next.js API routes, workers, and serverless handlers.
Pricing model
Free includes 200 pages/month with watermark. Pro is $199 for 1,000 pages/month.
Use PDFDancer when you need to change text inside a finished PDF and keep the document looking like the exported original. If your workflow is mainly generated forms or pure document creation, this page should not be the center of that evaluation.
Supported fit
- Text-based PDFs with editable text objects
- Paragraph, line, fragment, and placeholder-driven editing workflows
- TypeScript-friendly Node.js backends and upload-processing jobs
- Free plan for development, Pro and Enterprise for production throughput
Limits to know
- Scanned or image-only PDFs need OCR as an add-on before text editing
- Free output is watermarked and capped at 200 pages per month
- Pro includes 1,000 pages per month, then $0.19 per additional page
- Use the redaction flow separately when the job is permanent removal, not replacement
Getting Started
Three steps to your first Node.js edit
Install the SDK
npm install pdfdancer-client-typescript
Run the examples locally
Open a real PDF on your machine and test the editing API before creating an account.
Move into your app
Reuse the same code in scripts, API routes, workers, or upload-processing endpoints.
Questions
Frequently Asked
Start Using PDFDancer Today
Get started in seconds with our free tier. No credit card required.