Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why Translating a PDF Before Filling Forms Breaks Fields and Doubles Credit Costs

Sending a raw 25-page vendor packet to a document translator before fixing it locally causes two avoidable problems. First, at 2 credits per page, translating eight appendix pages you meant to delete costs 16 extra credits, and spotting an outdated address afterward means paying to run the whole file a second time. Second, editing text or filling AcroForm fields after translation often breaks…

Translating a PDF before editing forms can create two issues. First, translating eight appendix pages you intended to delete costs 16 extra credits, and finding an outdated address later forces you to pay for a second file rendering. Second, editing text or filling fields after translation may break because translated PDFs often have tightly subsetted fonts and altered content streams.

Editting text and filling fields in the browser first results in a clean PDF before transmitting. Typing into interactive PDF forms stores logical strings in the /V field, but this does not guarantee proper rendering. Each widget annotation needs an appearance stream ( /AP - /N ) containing the actual vector drawing instructions ( BT ...

ET ). Some tools set /NeedAppearances true in the /AcroForm dictionary and leave /AP empty, expecting downstream viewers to regenerate the drawing instructions. Many browser PDF engines and translation pipelines ignore /NeedAppearances and read existing /AP streams or page content streams directly. If a filled form is sent without refreshed /AP streams, recipients may see blank boxes even though /V still holds the text.

Also, most PDF generators use subsetted fonts, embedding only the glyphs needed for particular pages. When editing addresses or names after translation, the editor may not find the characters, leading to fallback glyphs, overlapping words, or errors when rewriting the text operator. Running find and replace before translating avoids patching inside a stripped font subset.

In a JavaScript client-side pipeline using pdf-lib, removing unwanted pages and writing explicit /AP streams before saving ensures form values do not depend on /NeedAppearances support downstream. Use removePage() to drop unneeded sheets locally, and updateFieldAppearances() before saving to ensure form values. If a signed form needs to stay locked after adding a signature, calling form.flatten() moves widget appearances into each page s /Contents stream.

Using KomoPDF for local edits and optional translation keeps original files untouched. Open PDF on komopdf.com, use Organize pages or Extract pages to remove unnecessary sheets, Edit content and find and replace to fix outdated information, Fill & forms to enter field values, and Sign to place your signature. If a translated version is needed, trigger translation to upload the edited PDF to KolmoPDF, which consumes 2 credits per page without affecting the original local file.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Python Decorators: A complete guide to decorators in Python

If you've seen something like @yo_i_am_decorating_this_func above a Python function and wondered what's going on, you're in the right place.

  • Decorators modify function behavior in Python
  • Functions are first-class objects in Python
  • Decorators use closures to wrap original functions

Why your falling-blocks game feels unfair (and three small fixes)

You can build a falling-blocks game that follows every rule and still have players call it unfair within a minute. The pieces fall, rows clear, the score goes up, but something feels off.

  • Replace pure randomness with shuffled bag of pieces
  • Implement wall kicks for smooth rotation near walls
  • Introduce lock delay to prevent instant death upon landing

Elm for Beginners: Frontend Code With No Runtime Errors

Elm is a functional language for building web frontends, and it makes a bold promise: no runtime errors. If your Elm program compiles, it will not crash in the browser with an undefined value or a…

  • Elm is a functional language for error-free web frontends.
  • Its Model-Update-View architecture simplifies state management.
  • Elm's compiler ensures code compiles correctly, reducing runtime errors.

More from Friday 13 November →