
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@livelybone/easy-pdf
Advanced tools
An easy-to-use PDF rendering library in browser, can be used as a solution to customize the display of PDF in App. Based on mozilla/pdf.js, the js/css is loaded via CDN asynchronously. 一个简便易用的,原生使用方式的(适用于各大框架)网页端 PDF 渲染插件,也可作为小程序/App webview 中自定义展示 pdf 的解
pkg.module supported
, which means that you can apply tree-shaking in you project
An easy-to-use PDF rendering library in browser, can be used as a solution to customize the display of PDF in App. Based on mozilla/pdf.js, the js/css is loaded via CDN asynchronously.
https://github.com/livelybone/easy-pdf.git
https://github.com/livelybone/easy-pdf#readme
Your can see the usage by run the example of the module, here is the step:
git clone https://github.com/livelybone/easy-pdf.git
cd your-module-directory
npm i
(use taobao registry: npm i --registry=http://registry.npm.taobao.org
)npm run dev
http://127.0.0.1:3000/examples/test.html
) in your browsernpm i -S @livelybone/easy-pdf
umd
bundleEasyPDF
See what method or params you can use in index.d.ts
import * as EasyPDF from '@livelybone/easy-pdf'
const container = document.getElementById('container')
/** Render all page */
EasyPDF.renderPdf('./sample.pdf', { container }).then(res => {
console.log(res)
})
/** Render single page */
EasyPDF.readPdf('./sample.pdf').then(pdf => {
EasyPDF.renderPdfPage(pdf, 1, { container }).then(res => {
console.log(res)
})
})
Use in html, see what your can use in CDN: unpkg
<-- use what you want -->
<script src="https://unpkg.com/@livelybone/easy-pdf/lib/umd/<--module-->.js"></script>
FAQs
An easy-to-use PDF rendering library in browser, can be used as a solution to customize the display of PDF in App. Based on mozilla/pdf.js, the js/css is loaded via CDN asynchronously. 一个简便易用的,原生使用方式的(适用于各大框架)网页端 PDF 渲染插件,也可作为小程序/App webview 中自定义展示 pdf 的解
We found that @livelybone/easy-pdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.