applitools / applitools/ImageTester

-nf drops page annotations: form fields, stamps and signature appearances vanish

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11
Forks
11
PR merge metrics
No merged PRs in 30d

Description

PdfFontNormalizer.normalize() builds the normalized page as
new PDPage(originalPage.getMediaBox()), carrying over only the rewritten
content stream and resources. The original page's /Annots array is never
copied, so anything rendered via annotations is absent from -nf output:
AcroForm widget appearances (i.e. FILLED FORM FIELD VALUES), stamps, and
signature appearance streams.

Same root cause as #44 (/Rotate) and #45 (CropBox): the bare-page rebuild
discards page-dictionary structures wholesale. A future fix should copy the
page dictionary and replace only /Contents (+ isolated resources) instead
of rebuilding from nothing - that would close #44, #45, and this in one
change.

No test pins this yet; found by code reading during the decoder-core port
(the port intentionally left the page rebuild untouched).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at PdfFontNormalizer.normalize() and trace how each page is rebuilt, then inspect issues #44 and #45 for related page-dictionary behavior. Verify that normalized output preserves annotations, rotation, and CropBox while changing the content and resources, with regression coverage for filled fields, stamps, and signature appearances.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.