import { PdfFile } from './document.js'; import { Reconstruction } from './flow-build.js'; /** §9.10.2 — a glyph the face maps to no character (see `./font`). */ export declare const UNMAPPED = "\uFFFD"; /** * Heuristically reconstruct an untagged PDF into a {@link Reconstruction} * (E-PDF EP4). With no structure tree there is only positioned content, so * reading order is recovered the way a human eye does: split a clean two-column * page at its central gutter (EP17), then within each column cluster runs * sharing a baseline into lines, order each line left-to-right inserting spaces * across gaps, group lines into paragraphs by their vertical spacing, and * interleave the column's images and filled vector paths (EP10) by their top * edge. Each run's `href` is carried through as a span so links survive, and a * font size well above the document median is guessed as a heading. The result * is inherently approximate. * * @param file The PDF to reconstruct. * @returns The reconstructed {@link FlowDoc} plus any read-time losses. */ export declare function reconstructByLayout(file: PdfFile, mode?: 'flow' | 'positional'): Reconstruction; /** * Whether a line ENDED a paragraph, rather than wrapping into the next. * * Leading alone cannot tell the two apart: five labels stacked at 15pt with a * 12pt face look exactly like five wrapped lines, and alphatrans.pdf's five are * read as one paragraph and re-wrapped into two. But a wrapping engine pulls * the next word UP — so a line that stops well short of the measure stopped * because its author stopped it, and the line after it begins something new. * The same rule separates two paragraphs set with no extra space between them, * which used to run together for the same reason. * * Only where both lines start at the same edge. Where they do not, the block is * placed rather than set — a centred title's every line is short of the measure * and none of them ends anything. * * @param prev The line before: where it starts, how wide it is, its face. * @param next The line after — only where it starts matters. * @param column The measure both were set in, when it is known. * @returns Whether the first line ended a paragraph. */ export declare function endedParagraph(prev: { x: number; width: number; fontSize: number; }, next: { x: number; }, column: { left: number; right: number; } | undefined): boolean;