forked from crabbly/Print.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
39 lines (36 loc) · 1 KB
/
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
33
34
35
36
37
38
39
declare type PrintTypes = 'pdf' | 'html' | 'image' | 'json';
export interface Configuration {
printable: any;
fallbackPrintable?: string;
type?: PrintTypes;
documentTitle?: string;
header?: any;
headerStyle?: string;
maxWidth?: number;
font?: string;
font_size?: string;
honorMarginPadding?: boolean;
honorColor?: boolean;
targetStyle?: string | string[];
targetStyles?: string | string[];
properties?: any;
gridHeaderStyle?: string;
gridStyle?: string;
showModal?: boolean;
onLoadingStart?: () => void;
onLoadingEnd?: () => void;
modalMessage?: string;
frameId?: string;
ignoreElements?: string | string[];
imageStyle?: string;
repeatTableHeader?: boolean;
css?: string | string[];
style?: string;
scanStyles?: boolean;
onError?: (error: any) => void;
onPrintDialogClose?: () => void;
onPdfOpen?: () => void;
}
declare function printJS(source: string, type?: PrintTypes): void;
declare function printJS(configuration: Configuration): void;
export default printJS;