TableGuard, BottomSpacer, FirstPageHeader and PageChrome implement the verified pagination rules; renderCore returns bytes, a normalised layout tree, audit issues and a layout fingerprint. auditLayout detects overlaps, ink overflow, truncation, header-only pages and split blocks. Quirk tests pin the react-pdf behaviours the design depends on, and a child-process test pins the page-level absolute Svg hang.
14 lines
679 B
TypeScript
14 lines
679 B
TypeScript
import { View } from "@react-pdf/renderer";
|
|
import { FILL } from "../engine/columns";
|
|
import { pdfFlags } from "./pdfProps";
|
|
|
|
/**
|
|
* Elastic gap before the closing block (amount in words, bank, signatory). It grows to push the closing
|
|
* block to the foot of whichever page it ends on. `closingH` is the closing block's height: as
|
|
* minPresenceAhead it keeps the spacer from staying on the previous page while the block starts the
|
|
* next one (without it the spacer stays behind and the block sits at the top of the new page).
|
|
*/
|
|
export function BottomSpacer({ closingH }: { closingH: number }) {
|
|
return <View style={FILL} {...pdfFlags({ minPresenceAhead: closingH })} />;
|
|
}
|