Show HN: Open Source PDF Viewer Using Chrome’s PDF Engine (MIT, WebAssembly)

20 bobsingor 17 5/29/2025, 1:55:38 PM embedpdf.com ↗

Comments (17)

bobsingor · 16h ago
I just open-sourced EmbedPDF, a modern JavaScript PDF viewer that uses PDFium compiled to WebAssembly — not PDF.js.

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

nip · 14h ago
Brilliant work!

From another fellow « pdf’er »

bobsingor · 14h ago
Wow, that really means a lot coming from you! I’ve come across SimplePDF quite a few times while researching! Super impressed by what you’ve built. Thanks for the kind words, fellow PDF’er
jerrygenser · 7h ago
Is there any security risk to use as project with an embedded .wasm binary? Is there a build process for this that we can reproduce, or is there a way to bring our own if it's a generally available asset?

Referring to this file: https://github.com/embedpdf/embed-pdf-viewer/blob/main/packa...

bobsingor · 2h ago
Good question. You can fully reproduce the build. We have a Dockerfile here that handles the process: https://github.com/embedpdf/embed-pdf-viewer/blob/main/packa...

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.

phonon · 8h ago
Looks great! Would be wonderful if someone added this to https://github.com/wojtekmaj/react-pdf
bobsingor · 8h ago
Thanks! I’ll be adding clearer documentation soon on how to integrate it with React and other major frameworks.

The viewer is designed to be framework-agnostic, and I’m working on lightweight integration layers for React, Vue, Svelte, etc. Stay tuned!

chreniuc · 9h ago
Nice, it looks wonderful. I've been using pdf.js and it gave me a lot of headaches.

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.

bobsingor · 9h ago
Thanks! Yeah, I really get that, pdf.js gave me a ton of headaches too. Honestly, that’s part of why I started building this. I just needed something that didn’t fight me every step of the way.

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!

const_cast · 7h ago
One way to generate PDFs, and it's kind of round-about, using HTML to then convert to PDF with Chromium. You can make the HTML using templates and you get access to CSS, too.
tbrockman · 9h ago
Fantastic! Looking forward to trying it out and replacing all my future links to PDFs with embeds instead.

How heavy of a component is it? (would typically inspect it myself but on my phone at the moment)

bobsingor · 9h ago
Thanks! Really appreciate that — curious to hear how it works out for you.

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.

jmitcheson · 3h ago
Umm this is amazing!

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?

bobsingor · 2h ago
Thanks so much, that’s a huge compliment, really appreciate it.

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!

SigmundA · 6h ago
Nice, I imagine it has the same issue as pdf.js when it comes to printing since its using canvas to render, it will just print bitmaps which leads to blurry print or OOM errors if doing high dpi.

pdf.js was trying to have a SVG renderer for a while which would allow vector printing, think they gave up on that.

badmonster · 11h ago
nice
bobsingor · 11h ago
Thanks!