@livelybone/easy-pdf
Advanced tools
Comparing version 1.0.2 to 1.0.3
interface PdfResources { | ||
/** Default: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/web/pdf_viewer.css' */ | ||
pdfViewerCssUrl?: string | ||
/** Default: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/build/pdf.min.js' */ | ||
pdfJsUrl?: string | ||
/** Default: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/web/pdf_viewer.js' */ | ||
pdfViewerJsUrl?: string | ||
} | ||
declare function loadPdfResources(resources?: PdfResources): Promise<any> | ||
interface ReadPdfOptions extends PdfResources { | ||
cMapPacked: boolean | ||
/** Default: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/' */ | ||
cMapUrl: string | ||
@@ -23,3 +25,2 @@ disableAutoFetch: boolean | ||
} | ||
interface RenderPdfOptions { | ||
@@ -30,3 +31,2 @@ container: HTMLElement | ||
} | ||
declare function readPdf( | ||
@@ -39,3 +39,2 @@ url: string, | ||
): Promise<any> | ||
declare function renderPdf( | ||
@@ -50,3 +49,2 @@ url: string, | ||
}> | ||
/** | ||
@@ -53,0 +51,0 @@ * @param pdf The result of readPdf |
/** | ||
* Bundle of @livelybone/easy-pdf | ||
* Generated: 2020-03-14 | ||
* Version: 1.0.2 | ||
* Version: 1.0.3 | ||
* License: MIT | ||
@@ -6,0 +6,0 @@ * Author: 2631541504@qq.com |
/** | ||
* Bundle of @livelybone/easy-pdf | ||
* Generated: 2020-03-14 | ||
* Version: 1.0.2 | ||
* Version: 1.0.3 | ||
* License: MIT | ||
@@ -6,0 +6,0 @@ * Author: 2631541504@qq.com |
{ | ||
"name": "@livelybone/easy-pdf", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "一个简便易用的,原生使用方式的(适用于各大框架)网页端 PDF 渲染插件,也可作为小程序/App webview 中自定义展示 pdf 的解决方案。基于 pdf.js,使用 CDN 异步加载 pdf.js 脚本。An easy to use web side PDF rendering plug-in, can be used as a solution to customize the display of PDF in WeChat-applet/App. Based on [mozilla/pdf.js](https://github.com/mozilla/pdfjs-dist), the js/css is loaded via CDN asynchronously", | ||
@@ -5,0 +5,0 @@ "main": "./lib/umd/index.js", |
20980
260