Skip to content
Shapemetry

Types - PDF

API reference for ./io/pdf on @huukhanhnguyen/types — the option and result records of @huukhanhnguyen/io's PDF reader/writer.

See the Guide for the package's role.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

PdfExportOptions

type

Option and result records of @huukhanhnguyen/io's io/pdf.ts.

Declarations only — the reader/writer runtime stays in @huukhanhnguyen/io.

type PdfExportOptions
// = {
    /** Page size overrides, PDF points, applied to every page. Default: each
     *  sheet's own SVG viewBox size (mm) converted to points. */
    pageWidth?: number;
    pageHeight?: number;
}

PdfPaint

type

type PdfPaint
// = {
    fill: [number, number, number] | null;
    stroke: [number, number, number] | null;
    strokeWidth: number;
}

PdfPattern

type

type PdfPattern
// = {
    id: string;
    /** Content stream for one cell (paths inside the pattern). */
    paintOps: string;
    width: number;
    height: number;
}

TablePdfOptions

type

Page/type metrics for tableToPdf — a PDF writer knob, not a table.

type TablePdfOptions
// = {
    /** Page size, PDF points. Default: A4 portrait (595 x 842). */
    pageWidth?: number;
    pageHeight?: number;
    /** Page margin, PDF points. Default 36 (0.5 in). */
    margin?: number;
    /** Text size, PDF points. Default 10. */
    fontSize?: number;
    /** Row height, PDF points. Default fontSize * 1.6. */
    rowHeight?: number;
}
Last updated: 📖 1 min readEdit on GitHub