Parse output metadata: page rotation, original dimensions, and file type

Parse runs now include a metadata object on output, alongside chunks:

  • originalMimeType / finalMimeType — the file’s media type before and after any format conversion.
  • pages — an array of per-page entries, each with:
    • number — the page number, matching metadata.page.number on that page’s blocks.
    • rotationApplied — degrees Extend rotated the page clockwise to make it upright. 0 if detection ran and the page was already upright, null if rotation detection was disabled for the run.
    • originalPageWidth / originalPageHeight — the file’s true page size, independent of rendering resolution.
    • dpi — the DPI that boundingBox/polygon coordinates on the page are scaled to; multiply the original dimensions by dpi / 72 to bring them into that same coordinate space.

metadata is null for parse runs that completed before this field was introduced, and pages is null when page-level metadata isn’t available.

Bounding boxes and polygons are always returned in the corrected (upright) frame. To draw a citation or highlight on your own copy of the original file, use these fields to map coordinates back — see Reconciling coordinates against your original file.