When you add metadata or machine-readable structure to an existing document, the hardest part is often not the new feature; it’s making sure you didn’t quietly break what already worked.
Suppose a team has a printed-style trail map PDF that people already use in the field. The layout, typography, contour lines, and legend were tuned by hand. Now someone wants to add geospatial metadata so the same PDF can also open in a mapping application with live GPS positioning.
If you rebuild the file from scratch or run it through a generic export pipeline, you might get coordinates, and lose the original drawing commands, vector sharpness, or layer order. A user who opens the updated file for printing notices that the labels shifted or the lines rasterized.
Preservation deserves its own acceptance criteria. Before touching the file, write down what must survive intact:
| What must survive | What is being added | What to verify |
|---|---|---|
| Original vector drawing commands and fonts | Geospatial coordinate metadata | Visual diff against the original page |
| Print layout, margins, and legend | Corner or tie-point registration | Coordinate serialization in the target format |
| Existing file readability in standard viewers | Machine-readable projection info | Opening the file in the receiving mapping app |
The workflow is straightforward:
- Identify what must survive before you write any code.
- Add the new metadata without re-rendering or flattening the existing page content.
- Compare the updated file against the original, both visually and structurally, to confirm the artwork didn’t change.
- Check how coordinates and projection metadata are serialized.
- Test the file in the actual receiving application, not just in your own script.

If the receiving application cannot read the coordinates, or if the page looks different when printed, the job isn’t done.
—jhunterj