-nf drops /Rotate: normalized pages render sideways

Open Beginner friendly
#44 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java
Domain
cli

Research direction

Start in PdfFontNormalizer.normalize(), where the issue identifies construction of the normalized page, then run the ignored PdfFontNormalizerEdgeCaseTest cases normalized_page_preserves_rotation and normalized_render_of_rotated_page_keeps_original_dimensions. Done means normalized pages retain the original rotation and dimensions when -nf is enabled, with both tests passing.

Written by the indexing model from the issue text.

Description

PdfFontNormalizer.normalize() builds the normalized page as
new PDPage(originalPage.getMediaBox()) and never calls setRotation(),
so a page with /Rotate 90 renders unrotated (sideways vs. its own baseline)
whenever -nf is enabled.

Pinned by @Ignore'd tests in PdfFontNormalizerEdgeCaseTest
(normalized_page_preserves_rotation,
normalized_render_of_rotated_page_keeps_original_dimensions).

Found by code reading during the -nf test-corpus work
(docs/superpowers/specs/2026-08-10-nf-test-pdf-corpus-design.md, local);
no rotated page occurred in the 28-file real-PDF sample, so severity is
lower than the encoding defect.

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

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.

More from applitools/ImageTester

All issues in applitools/ImageTester

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.