UNPKG

@pdfme/common

Version:

TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!

28 lines (27 loc) 1.06 kB
import { Schema, Template, BasePdf, CommonOptions } from './types.js'; interface ModifyTemplateForDynamicTableArg { template: Template; input: Record<string, string>; _cache: Map<string | number, unknown>; options: CommonOptions; getDynamicHeights: (value: string, args: { schema: Schema; basePdf: BasePdf; options: CommonOptions; _cache: Map<string | number, unknown>; }) => Promise<number[]>; } /** * Process a template containing tables with dynamic heights * and generate a new template with proper page breaks. * * Processing is done page-by-page: * - Pages with height changes are processed with full layout calculations * - Pages without height changes are copied as-is (no offset propagation between pages) * * This reduces computation cost by: * 1. Limiting layout calculations to pages that need them * 2. Avoiding cross-page offset propagation for static pages */ export declare const getDynamicTemplate: (arg: ModifyTemplateForDynamicTableArg) => Promise<Template>; export {};