Skip to main content

PDFDancer · Prepress automation · Python / TypeScript / Java

Go Beyond Standard PDF Fixups.

Precise PDF corrections in existing prepress workflows.

Correct text, replace fonts, and update finished, customer-supplied PDFs without the original artwork files. Keep your production workflow. Extend what it can fix.

The PDF you receive is the PDF you have to work with.

Fragmented text and embedded subset fonts can turn routine PDF fixups into manual jobs. When the original artwork is unavailable, the correction has to happen in the PDF.

  • Replace text that standard find-and-replace misses.

    Find and replace words or phrases even when they are fragmented across multiple PDF text elements within a detected text unit.

  • Work with embedded subset fonts.

    Reuse glyphs already embedded in the document, including glyphs from related font subsets, when the required characters are available.

  • Replace fonts throughout existing documents.

    Automate document-wide font replacement with size adjustments to help preserve the original appearance.

  • Control how corrections affect the layout.

    Keep unaffected text fixed, shift following text on existing lines, or rewrap supported text blocks. Choose the appropriate behavior for each correction.

  • Automate corrections across production batches.

    Apply the same targeted changes to large numbers of existing PDFs through your own scripts and production systems.

Replace a name, even when its text is fragmented.

Python

In this example, “Old Authority” is split across text elements within one detected text unit. Match the full name without joining those elements yourself.

from pathlib import Path
from pdfdancer import PDFDancer, TextReplaceRequest

with PDFDancer.open(pdf_data=Path("customer-artwork.pdf")) as pdf:
    request = (
        TextReplaceRequest.literal("Old Authority", "New Authority")
        .source_anchored()
        .build()
    )
    result = pdf.text().replace(request)
    if result.errors or result.warnings or (result.matched, result.changed) != (1, 1):
        raise RuntimeError(result)
    pdf.save("corrected-artwork.pdf")

Keep unaffected text at its existing coordinates. Save only when exactly one match changes without warnings or errors. Set PDFDANCER_API_TOKEN to use your API token.

Text layout documentation

Check the corrected artwork before release.

Replacement text can overlap unchanged text if it needs more space. Inspect the output and run your existing preflight and approval checks before batch use.

A new font. An entire backlist.

A publisher needs to replace a font across its backlist. Finished PDFs are available, but the original layout files are missing for some titles.

Script document-wide font replacement with size adjustments to help preserve the original appearance. Apply it across the collection, then review the typography and run existing production checks before release.

Fits into the workflows you already run.

Add PDF content corrections to your production scripts with Python, TypeScript, or Java.

Your existing systems keep control of workflow orchestration, preflight, approval, and production delivery.

Automate the corrections your workflow can't handle yet.

Extend your existing prepress automation with precise edits to finished PDFs.

Try the SDK