/** * Word Document Page Renderer — SVG Output * * Renders DOCX document pages to SVG strings for visual preview. * Uses the layout engine for pagination and produces approximate * visual representations of document content. * * @stability experimental */ import type { DocxDocument } from "../types.js"; import type { LayoutDocument } from "./layout-model.js"; /** Options for rendering document pages to SVG. */ export interface RenderOptions { /** Output SVG width in pixels. If not set, derived from page dimensions. */ readonly width?: number; /** Output SVG height in pixels. If not set, derived from page dimensions. */ readonly height?: number; /** Font family mapping: document font name → SVG font-family value. */ readonly fonts?: ReadonlyMap; /** Background color (CSS color string). Default: "white". */ readonly backgroundColor?: string; /** Scale factor for the output. Default: 1.0. */ readonly scale?: number; } /** * Render a specific page of a DOCX document to an SVG string. * * @param doc - The parsed DOCX document * @param pageNumber - 1-based page number to render * @param options - Rendering options * @returns SVG string for the specified page * * @stability experimental */ export declare function renderPageToSvg(doc: DocxDocument, pageNumber: number, options?: RenderOptions): string; /** * Render all pages of a DOCX document to SVG strings. * * @param doc - The parsed DOCX document * @param options - Rendering options * @returns Array of SVG strings, one per page * * @stability experimental */ export declare function renderDocumentToSvg(doc: DocxDocument, options?: RenderOptions): string[]; /** * Render a page from a pre-computed LayoutDocument to SVG. * This avoids re-computing layout — just serializes positioned elements to SVG. * * @param layout - A LayoutDocument produced by layoutDocumentFull(). * @param pageNumber - 1-based page number to render. * @param options - Rendering options (scale, dimensions, background color). * @returns SVG string. * * @stability experimental */ export declare function renderPageFromLayout(layout: LayoutDocument, pageNumber: number, options?: RenderOptions): string;