/** * Physical paragraph-border widths for the standalone export (issue #1116). * * CSS lays every border out in whole CSS pixels, never below one, so a declared 0.25pt * (`w:sz="2"`) paragraph border is both drawn and spaced as 0.75pt. The converter records each * explicitly sized single or dashed side as `--docx-border-{side}-width` on the border wrapper * (`data-docx-exact-border`). Before pagination, `prepareParagraphBorders` replaces those CSS * borders with padding of the declared width, so the box and the text it holds are laid out * exactly. After the page tree is final, `paintParagraphBorders` draws the recorded sides as * vector shapes from each page box's origin, which is the only coordinate space the PDF printer * does not snap. Omitted-size borders and other border styles keep their CSS rendering. * * The shapes are drawn over the page, outside the paragraph's own ancestors, so they do not inherit * the clips the paragraph sits under. An exact-height table row hides the borders of the content it * hides, as Word does (issue #1171), so each side is trimmed to the vertical span of the exact-row * cells around the paragraph. The row clips by height only: a left or right border in the cell * margin, beside the text, is drawn in full. */ /** Set by `prepareParagraphBorders` on a border box whose recorded sides it paints after pagination. */ export declare const PAINT = "data-docx-border-paint"; /** Lay out recorded paragraph borders at their declared width. Run before pagination measures. */ export declare function prepareParagraphBorders(root: HTMLElement): number; /** * Leave one horizontal side of a prepared border box unpainted: the part of a bordered paragraph * group that a page break opens (issue #1202). */ export declare function omitPaintedBorderSide(element: HTMLElement, side: "top" | "bottom"): void; /** Paint prepared borders on the final page tree. Layout and the PageMap do not change here. */ export declare function paintParagraphBorders(container: HTMLElement, pageBoxSelector?: string): number; //# sourceMappingURL=paragraph-borders.d.ts.map