View as Markdown

API reference: @salmonui/export/graphics

GraphicsPdfOptionsinterface

import type { GraphicsPdfOptions } from '@salmonui/export/graphics';
interface GraphicsPdfOptions {
    readonly fileName?: string;
    readonly pageSize?: PdfPageSize | 'A4' | 'A3' | 'Letter' | 'Legal' | readonly [
        number,
        number
    ] | {
        readonly width: number;
        readonly height: number;
    };
    readonly orientation?: 'portrait' | 'landscape';
    readonly margin?: number;
    readonly header?: string;
    readonly footer?: string;
    readonly title?: string;
    readonly font?: PdfFont | PdfFontData;
    readonly compress?: boolean;
}
GraphicsPdfOptions members (9)
NameSignatureDescription
fileNameoptionalreadonly fileName?: string;

Default Chart.pdf.

pageSizeoptionalreadonly pageSize?: PdfPageSize | 'A4' | 'A3' | 'Letter' | 'Legal' | readonly [ number, number ] | { readonly width: number; readonly height: number; };

A PDF writer page size (case-insensitive) or the size in points. Default a4.

orientationoptionalreadonly orientation?: 'portrait' | 'landscape';

Default: landscape when the drawing is wider than tall.

marginoptionalreadonly margin?: number;

Page margin in points. Default 36.

headeroptionalreadonly header?: string;

Page header text; {page} and {pages} are replaced.

footeroptionalreadonly footer?: string;

Page footer text. Default none.

titleoptionalreadonly title?: string;

Document title (PDF Info).

fontoptionalreadonly font?: PdfFont | PdfFontData;

TrueType font for all text: needed outside WinAnsi.

compressoptionalreadonly compress?: boolean;

Deflate the page streams when the platform has CompressionStream. Default true.