-
Notifications
You must be signed in to change notification settings - Fork 95
/
index.ts
30 lines (27 loc) · 1.28 KB
/
index.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
import { NativeModules } from 'react-native';
import { PDFViewCtrl } from './src/PDFViewCtrl/PDFViewCtrl';
import { DocumentView } from './src/DocumentView/DocumentView';
import { Config } from './src/Config/Config';
import * as AnnotOptions from './src/AnnotOptions/AnnotOptions';
interface RNPdftron {
initialize(licenseKey: string) : void;
enableJavaScript(enabled: boolean) : void;
getVersion() : Promise<string>;
getPlatformVersion() : Promise<string>;
getSystemFontList() : Promise<string>;
clearRubberStampCache() : Promise<void>;
encryptDocument(filePath: string, password: string, currentPassword: string) : Promise<void>;
pdfFromOffice(docxPath: string, options: {applyPageBreaksToSheet?: boolean, displayChangeTracking?: boolean, excelDefaultCellBorderWidth?: number,
excelMaxAllowedCellCount?: number, locale?: string}) : Promise<string>;
pdfFromOfficeTemplate(docxPath: string, json: object) : Promise<string>;
exportAsImage(pageNumber: number, dpi: number, exportFormat: Config.ExportFormat, filePath: string, transparent: boolean) : Promise<string>;
clearSavedViewerState() : Promise<void>;
}
const RNPdftron : RNPdftron = NativeModules.RNPdftron;
export {
RNPdftron,
PDFViewCtrl,
DocumentView,
Config,
AnnotOptions,
};