From e9ebd641564631a26c1ccf0717d0ffe133023e50 Mon Sep 17 00:00:00 2001 From: hamza zia Date: Tue, 17 Mar 2015 10:15:54 +0800 Subject: [PATCH] Added PDFViewer constructor --- pdf/pdf.d.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pdf/pdf.d.ts b/pdf/pdf.d.ts index 8496a6c40..802c0e601 100644 --- a/pdf/pdf.d.ts +++ b/pdf/pdf.d.ts @@ -200,6 +200,11 @@ interface PDFRenderParams { continueCallback?: (_continue: () => void) => void; } +interface PDFViewerParams { + container: HTMLElement; + viewer?: HTMLElement; +} + /** * RenderTask is basically a promise but adds a cancel function to termiate it. **/ @@ -295,12 +300,12 @@ interface PDFObjects { } interface PDFJSStatic { - + /** * The maximum allowed image size in total pixels e.g. width * height. Images above this value will not be drawn. Use -1 for no limit. **/ maxImageSize: number; - + /** * By default fonts are converted to OpenType fonts and loaded via font face rules. If disabled, the font will be rendered using a built in font renderer that constructs the glyphs with primitive path commands. **/ @@ -337,6 +342,8 @@ interface PDFJSStatic { passwordCallback?: (fn: (password: string) => void, reason: string) => string, progressCallback?: (progressData: PDFProgressData) => void) : PDFPromise; + + PDFViewer(params: PDFViewerParams): void; } declare var PDFJS: PDFJSStatic;