Skip to content

Single source figure exported as multiple separate image files instead of one #1092

Description

@mfh7

On a 36-page test document (mixed text/code/screenshot SAP training PDF), one figure ("Figure 102" in the source numbering) that is a single image in the source PDF is exported by Marker as multiple separate image files, each covering a portion of the original figure. The markdown output then references multiple fragment images in sequence where a reader expects one unified figure — visually broken when rendered (misaligned edges, no indication the fragments belong together).

Repro attempted, not yet reproduced: tried 3 synthetic constructions to isolate the trigger — (1) one diagram split into two image page-objects, stacked touching edge-to-edge; (2) a single image object with a large blank visual gap between two content clusters; (3) variant (1) with a stray text object sitting at the seam between the two tiles. All three were correctly merged by Marker into one exported Figure/Picture + FigureGroup/PictureGroup — none reproduced the fragmentation seen on the real document (confirmed via marker-pdf==1.10.2's own *_meta.json block_counts for each attempt). The real-document trigger remains unidentified; filing this as an observation report rather than blocking on finding the repro. Candidate untried angles: overlapping-but-not-touching tiles, tiles of different pixel dimensions/DPI, or a multi-column page layout interacting with the figure's bounding box.

Ask: when multiple image-type page objects are spatially adjacent and clearly part of one visual unit (touching or near-touching bounding boxes), consider merging them into a single exported image, or at minimum grouping them in the output so a downstream renderer/reader can tell they're one figure. Happy to help narrow down the trigger further if there's a known code path this might point to.

Environment: marker-pdf==1.10.2.

Related: #1091 (this repo's other report from the same test document, on silent image loss).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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