Function: exportPdf()
function exportPdf(pages, options): Promise<Blob>;
Lazy: import('./impl.js') loads jspdf + svg2pdf.js on first call. Browser only.
Parameters
pages
readonly PdfPageSource[]
options
Returns
Promise<Blob>
Example
import { compileDbml, layoutDiagram } from '@relvista/core';
import { downloadBlob, exportPdf } from '@relvista/renderer';
const { model } = compileDbml(source);
const geometry = await layoutDiagram(model!);
const pdf = await exportPdf([{ title: 'Shop', model: model!, geometry }], { mode: 'tiled', paper: 'a4' });
downloadBlob(pdf, 'shop.pdf');