@techstark/pdfium
v0.0.1-beta.1
Published
WebAssembly build of PDFium for Node.js and browsers
Readme
@techstark/pdfium
This package contains the generated WebAssembly build of PDFium for Node.js and browsers. It is intended for advanced integrations that want to consume the generated bindings directly.
Installation
npm install @techstark/pdfiumUsage
CommonJS
const { loadPdfium } = require('@techstark/pdfium');
async function main() {
const pdfium = await loadPdfium();
console.log(typeof pdfium.ccall, typeof pdfium.cwrap);
}
main().catch(console.error);ES modules
import { loadPdfium } from '@techstark/pdfium';
const pdfium = await loadPdfium();
console.log(typeof pdfium.ccall, typeof pdfium.cwrap);The package also exposes createPdfiumModule as an alias for loadPdfium.
Notes
- This package ships the generated Emscripten artifacts (
pdfium.js,pdfium.wasm,pdfium.esm.js,pdfium.esm.wasm) rather than a high-level PDF API. - It is best suited for integrations that want to call the underlying PDFium bindings directly.
- For the latest source and issue tracking, see the repository below.
Repository
https://github.com/TechStark/pdfium-lib
