API reference: @salmonui/export/pdf
PdfOptionsinterface
import type { PdfOptions } from '@salmonui/export/pdf';interface PdfOptions extends ExportWriterOptions {
readonly pageSize?: PdfPageSize | readonly [
number,
number
];
readonly orientation?: 'portrait' | 'landscape';
readonly margin?: number;
readonly fontSize?: number;
readonly columnOverflow?: 'fit' | 'paginate';
readonly header?: string;
readonly footer?: string;
readonly includeHeaders?: boolean;
readonly title?: string;
readonly compress?: boolean;
readonly font?: PdfFont | PdfFontData;
readonly mergeRepeatedValues?: boolean;
readonly appendImages?: readonly ExportImage[];
}
PDF writer options.
| Name | Signature | Description |
|---|---|---|
pageSizeoptional | readonly pageSize?: PdfPageSize | readonly [
number,
number
]; | Default |
orientationoptional | readonly orientation?: 'portrait' | 'landscape'; | Default |
marginoptional | readonly margin?: number; | Page margin in points. Default 36. |
fontSizeoptional | readonly fontSize?: number; | Body font size in points. Default 8. |
columnOverflowoptional | readonly columnOverflow?: 'fit' | 'paginate'; |
|
headeroptional | readonly header?: string; | Page header text; |
footeroptional | readonly footer?: string; | Page footer text; default |
includeHeadersoptional | readonly includeHeaders?: boolean; | Header rows. Default true. |
titleoptional | readonly title?: string; | Document title ( |
compressoptional | readonly compress?: boolean; | Deflate content streams (when the platform has |
fontoptional | readonly font?: PdfFont | PdfFontData; | TrueType font bytes ( |
mergeRepeatedValuesoptional | readonly mergeRepeatedValues?: boolean; | Merge repeated values in consecutive data rows, as XLSX. Default false. |
appendImagesoptional | readonly appendImages?: readonly ExportImage[]; | Pages after the table, one PNG or JPEG image each ( |
stylesoptionalinherited | styles?: ExportStyles; | |
sliceMsoptionalinherited | sliceMs?: number; | Time slice in ms before the writer yields to the event loop. Default 25. |
yieldoptionalinherited | yield?: YieldFn; | Awaited between slices. Default: a macrotask. |