Show HN: Open Source PDF Viewer Using Chrome’s PDF Engine (MIT, WebAssembly)
embedpdf.com
embedpdf.com
If you've ever tried to deeply customize PDF.js or needed high-fidelity rendering, you’ve probably hit its limits. And when looking for alternatives, most roads lead to Apryse (formerly PDFTron) or Nutrient (formerly PSPDFKit) — both powerful, but closed-source and expensive.
There hasn’t really been a good middle ground — until now.
GitHub: https://github.com/embedpdf/embed-pdf-viewer
Demo & Docs: https://www.embedpdf.com
From another fellow « pdf’er »
The viewer is designed to be framework-agnostic, and I’m working on lightweight integration layers for React, Vue, Svelte, etc. Stay tuned!
Referring to this file: https://github.com/embedpdf/embed-pdf-viewer/blob/main/packa...
Here’s the commit: https://github.com/embedpdf/embed-pdf-viewer/commit/ff928377...
Thanks again for raising the point — really good feedback!
Also, if you look in the package.json, there is a wasm script set up. Running pnpm run wasm will build the .wasm file inside Docker, so you get a clean, repeatable build.
Another issue with pdfs is generating them, I'm still looking, years later, a library that you can pass a template or something and it generates a pdf. A simple interface to generwting pdfs, I couldn't find any. I was curious if you have plans on also implementing a Pdf generator.
Not planning to build a PDF generator just yet, but you're not the first to mention it. If more folks are looking for that kind of thing, I’d definitely consider it. Appreciate you bringing it up!
pdf.js was trying to have a SVG renderer for a while which would allow vector printing, think they gave up on that.
How heavy of a component is it? (would typically inspect it myself but on my phone at the moment)
As for size (gzipped): the main JS file is about 77kB, the web worker is around 43kB, and the largest part is pdfium.wasm at roughly 2.7MB. The wasm handles all the heavy lifting, and it loads separately, so the core viewer stays pretty lightweight.
The company I work for displays large engineering drawings in the browser; right now we have to choose between manual png conversion and loading the vectors directly (each one has its own problems). I tried the snippet application with one drawing and it renders perfectly.
For our application we have a 'Google Maps' style viewport where you pan and zoom with the mouse, though. Right now I'm seeing if Gemini 2.5 Pro can refactor the snippet application to work this way. Did you have any plans for building another type of snippet application which works in the fashion?
You can try it here: https://snippet.embedpdf.com/
Actually, most of what you’re describing is already there. We built a tiling plugin (https://github.com/embedpdf/embed-pdf-viewer/tree/main/packa...) that works kind of like Google Maps — instead of rendering the full document, it splits it into tiles and only renders what’s visible in the viewport. That’s how we keep it fast even for really large documents.
Right now we support pinch-zoom on mobile, but mouse pan/zoom isn’t wired up yet. Would love to see you collaborate on the project if you’re interested. This kind of feedback is a big encouragement!
How does it work on other browsers other than chrome?
I tested it on Chrome, Safari, and Edge, and it’s been working great across all of them.
I’m currently working on annotations, highlights, comments, and more. Made good progress and should have something to release soon!