Skip to content

-nf drops CropBox: normalized render falls back to MediaBox dimensions #45

Description

@valandi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions