@maistik/nuxt-pdf
Version:
A Nuxt 3 & 4 module for server-side PDF generation using Handlebars templates
23 lines (22 loc) • 730 B
TypeScript
export interface PdfGenerateOptions {
format?: string;
margin?: {
top?: number;
bottom?: number;
left?: number;
right?: number;
};
landscape?: boolean;
printBackground?: boolean;
pageBreak?: {
before?: string[];
after?: string[];
avoid?: string[];
};
}
export declare function usePdf(): {
generate: (template: string, data: Record<string, unknown>, options?: PdfGenerateOptions, locale?: string) => Promise<Blob>;
download: (template: string, data: Record<string, unknown>, options?: PdfGenerateOptions, filename?: string, locale?: string) => Promise<void>;
getAvailableLocales: () => string[];
getDefaultLocale: () => string;
};