applitools / applitools/ImageTester
-nf drops CropBox: normalized render falls back to MediaBox dimensions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 11
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
PdfFontNormalizer.normalize() copies only the MediaBox to the normalized
page. A source page whose CropBox is tighter than its MediaBox renders at
CropBox dimensions normally, but at MediaBox dimensions under -nf - the
checkpoint changes size and every baseline mismatches.
Pinned by @Ignore'd tests in PdfFontNormalizerEdgeCaseTest
(normalized_page_preserves_cropbox_dimensions,
normalized_render_matches_cropped_dimensions).
Found by code reading during the -nf test-corpus work; no CropBox!=MediaBox
page occurred in the 28-file real-PDF sample.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in PdfFontNormalizer.normalize() and inspect the ignored cases in PdfFontNormalizerEdgeCaseTest: normalized_page_preserves_cropbox_dimensions and normalized_render_matches_cropped_dimensions. Run those tests to confirm the current MediaBox-only behavior; done means normalized pages retain the source CropBox dimensions and cropped renders match their non-normalized dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100