{"_id":"@elhalawany/pdfium","name":"@elhalawany/pdfium","dist-tags":{"latest":"1.5.0"},"versions":{"1.5.0":{"name":"@elhalawany/pdfium","version":"1.5.0","private":false,"description":"PDFium WebAssembly for the web platform. This package provides a powerful JavaScript interface to PDFium, enabling high-quality PDF rendering and manipulation directly in web applications.","type":"module","license":"MIT","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"browser":{"types":"./dist/index.d.ts","default":"./dist/index.browser.js"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./pdfium.wasm":"./dist/pdfium.wasm"},"repository":{"type":"git","url":"git+https://github.com/embedpdf/embed-pdf-viewer.git","directory":"packages/pdfium"},"homepage":"https://www.embedpdf.com/docs/pdfium/introduction","bugs":{"url":"https://github.com/embedpdf/embed-pdf-viewer/issues"},"keywords":["pdf","pdfium","webassembly","wasm","render","viewer"],"author":{"name":"Bob Singor, Ji Chang"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.8","@rollup/plugin-node-resolve":"^15.2.1","@rollup/plugin-replace":"^5.0.2","@rollup/plugin-typescript":"^11.1.2","@types/emscripten":"^1.39.13","cpy-cli":"^5.0.0","magic-string":"^0.30.17","rollup":"^3.28.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-dts":"^6.2.1","typescript":"^5.0.0"},"publishConfig":{"access":"public"},"scripts":{"build":"rollup -c","build:watch":"rollup -c -w","wasm:dev":"docker compose up --build pdfium-dev","wasm:build":"docker compose run --rm pdfium-build","clean":"rimraf dist","lint":"eslint src --color","lint:fix":"eslint src --color --fix","prewasm":"node ./scripts/generate-exported-functions.js && node ./scripts/generate-exported-runtime-methods.js","wasm":"make build && pnpm run wasm:copy","wasm:copy":"cpy \"./docker/dist/{pdfium.cjs,pdfium.js,pdfium.wasm,functions.ts,runtime-methods.ts}\" ./src/vendor --flat","build:all":"pnpm run wasm && pnpm run build"},"_id":"@elhalawany/pdfium@1.5.0","_integrity":"sha512-SmfbpSxt1kUEJzr8wunLJ4AOn1SM3QXC+Enc7TovZHfDO0yX4qXaNeMCbAftOe2wBmJhIXGFYxD0479Iwrx3vA==","_resolved":"C:\\Users\\moham\\AppData\\Local\\Temp\\1a4be3d99c4b88151ced984f8f323464\\elhalawany-pdfium-1.5.0.tgz","_from":"file:elhalawany-pdfium-1.5.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-SmfbpSxt1kUEJzr8wunLJ4AOn1SM3QXC+Enc7TovZHfDO0yX4qXaNeMCbAftOe2wBmJhIXGFYxD0479Iwrx3vA==","shasum":"0a161eeda0753481a9e3b9575ed8494ea0135a80","tarball":"https://registry.npmjs.org/@elhalawany/pdfium/-/pdfium-1.5.0.tgz","fileCount":18,"unpackedSize":10720800,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG15GX7vSlCBp9PIa71KhCtmPP6gE7zWC0EkUoLs6PGlAiEAnP2+l7bS3TerbR9r46Ei9uOZc3A8dtdWf735czLbq5M="}]},"_npmUser":{"name":"elhalawany","email":"mohammed.el7alawany@gmail.com"},"directories":{},"maintainers":[{"name":"elhalawany","email":"mohammed.el7alawany@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdfium_1.5.0_1765679638144_0.13195160272796835"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-14T02:33:58.086Z","1.5.0":"2025-12-14T02:33:58.443Z","modified":"2025-12-14T02:33:58.705Z"},"maintainers":[{"name":"elhalawany","email":"mohammed.el7alawany@gmail.com"}],"description":"PDFium WebAssembly for the web platform. This package provides a powerful JavaScript interface to PDFium, enabling high-quality PDF rendering and manipulation directly in web applications.","homepage":"https://www.embedpdf.com/docs/pdfium/introduction","keywords":["pdf","pdfium","webassembly","wasm","render","viewer"],"repository":{"type":"git","url":"git+https://github.com/embedpdf/embed-pdf-viewer.git","directory":"packages/pdfium"},"author":{"name":"Bob Singor, Ji Chang"},"bugs":{"url":"https://github.com/embedpdf/embed-pdf-viewer/issues"},"license":"MIT","readme":"<div align=\"center\">\r\n  <a href=\"https://wwww.embedpdf.com\">\r\n    <img alt=\"EmbedPDF logo\" src=\"https://www.embedpdf.com/logo-192.png\" height=\"96\">\r\n  </a>\r\n  <h1>EmbedPDF</h1>\r\n\r\n<a href=\"https://www.npmjs.com/package/@embedpdf/pdfium\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@embedpdf/pdfium.svg?style=for-the-badge&labelColor=000000\"></a>\r\n<a href=\"https://github.com/embedpdf/embed-pdf-viewer/blob/main/packages/pdfium/LICENSE\"><img alt=\"License\" src=\"https://img.shields.io/npm/l/@embedpdf/pdfium.svg?style=for-the-badge&labelColor=000000\"></a>\r\n<a href=\"https://github.com/embedpdf/embed-pdf-viewer/discussions\"><img alt=\"Join the community on GitHub\" src=\"https://img.shields.io/badge/Join%20the%20community-blueviolet.svg?style=for-the-badge&labelColor=000000\"></a>\r\n\r\n</div>\r\n\r\n# @embedpdf/pdfium\r\n\r\nPDFium WebAssembly for the web platform. This package provides a powerful JavaScript interface to PDFium, enabling high-quality PDF rendering and manipulation directly in web applications.\r\n\r\n## Documentation\r\n\r\nFor complete documentation, examples, and API reference, please visit:\r\n\r\n**[Official Documentation](https://www.embedpdf.com/docs/pdfium/introduction)**\r\n\r\n## What is PDFium?\r\n\r\nPDFium is an open-source PDF rendering engine originally developed by Foxit Software and later released as open source by Google. Written in C++, it's the same engine that powers PDF viewing in Chrome and numerous other applications. This package brings native-quality PDF capabilities to the browser through WebAssembly, without requiring any server-side processing.\r\n\r\n## Features\r\n\r\n- High-fidelity rendering of PDF pages\r\n- Text extraction and search\r\n- Form filling and manipulation\r\n- Annotation support\r\n- Digital signature verification\r\n- PDF modification and creation\r\n\r\n## Installation\r\n\r\n```bash\r\n# npm\r\nnpm install @embedpdf/pdfium\r\n\r\n# pnpm\r\npnpm add @embedpdf/pdfium\r\n\r\n# yarn\r\nyarn add @embedpdf/pdfium\r\n\r\n# bun\r\nbun add @embedpdf/pdfium\r\n```\r\n\r\n## Basic Usage\r\n\r\n```javascript\r\nimport { init, WrappedPdfiumModule } from '@embedpdf/pdfium';\r\n\r\nconst pdfiumWasm =\r\n  'https://cdn.jsdelivr.net/npm/@embedpdf/pdfium/dist/pdfium.wasm';\r\n\r\nlet pdfiumInstance = null;\r\n\r\nasync function initializePdfium() {\r\n  if (pdfiumInstance) return pdfiumInstance;\r\n\r\n  const response = await fetch(pdfiumWasm);\r\n  const wasmBinary = await response.arrayBuffer();\r\n  pdfiumInstance = await init({ wasmBinary });\r\n\r\n  // Initialize the PDFium extension library\r\n  // This is required before performing any PDF operations\r\n  pdfiumInstance.PDFiumExt_Init();\r\n\r\n  return pdfiumInstance;\r\n}\r\n\r\n// Usage\r\nasync function renderPdf() {\r\n  const pdfium = await initializePdfium();\r\n  // Use pdfium to load and render PDFs\r\n  // See documentation for detailed examples\r\n}\r\n```\r\n\r\n## Learn More\r\n\r\nCheck out our comprehensive documentation at [embedpdf.com/docs/pdfium](https://www.embedpdf.com/docs/pdfium/introduction) for:\r\n\r\n- Detailed API reference\r\n- Code examples\r\n- Best practices\r\n- Advanced usage\r\n\r\n## License\r\n\r\nThis package is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\nIt also bundles [PDFium](https://pdfium.googlesource.com/pdfium/) in WebAssembly form,  \r\nwhich is licensed under the [Apache License, Version 2.0](LICENSE.pdfium).  \r\n","readmeFilename":"README.md","_rev":"1-21bbfd9983f08bc5410d951d09a0484c"}