forked from Szpadel/chrome-headless-render-pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
32 lines (30 loc) · 933 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
interface IRenderPdfOptions {
printLogs?: boolean;
printErrors?: boolean;
chromeBinary?: string;
chromeOptions?: string[];
remoteHost?: string;
remotePort?: string;
noMargins?: boolean;
landscape?: boolean;
includeBackground?: boolean;
windowSize?: boolean;
paperWidth?: string;
paperHeight?: string;
pageRanges?: string;
scale?: number;
displayHeaderFooter?: boolean;
headerTemplate?: string;
footerTemplate?: string;
jsTimeBudget?: number;
animationTimeBudget?: number;
}
interface IJobPair {
url: string;
pdf: string;
}
export default class RenderPDF {
static generateSinglePdf(url: string, filename: string, options?: IRenderPdfOptions): Promise<void>;
static generateMultiplePdf(pairs: IJobPair[], options?: IRenderPdfOptions): Promise<void>;
static generatePdfBuffer(url: string, options?: IRenderPdfOptions): Promise<Buffer>;
}