Skip to content

Conversation

@kateinoigakukun
Copy link
Contributor

First of all, thank you for maintaining this great project! We really appreciate your effort.


Motivation

We are using wasm build of PDFium from this project in our Web client application by simply vendoring files extracted from the wasm.tgz. However, if we can manage the build artifact as an npm dependency, it would make easier to maintain and upgrade.

Proposal

If we can publish a tarball that is compatible with the format that npm install expects to somewhere like GitHub Releases, it allows us to import the artifacts without vendoring them like below.

$ npm install https://github.com/paulocoutinhox/pdfium-lib/releases/download/<version>/wasm-release.tgz
import PDFiumModule from "pdfium-lib";
import PDFiumWASM from "pdfium-lib/pdfium.wasm?url";

await PDFiumModule({
    instantiateWasm: (info, callback) => {
        fetch(PDFiumWASM).then((response) => {
            WebAssembly.instantiateStreaming(response, info).then(({ instance }) => callback(instance));
        });
    }
})

@kateinoigakukun kateinoigakukun force-pushed the pr-0c2378f7dfa95d7b34c78412908eec9ace06e49b branch from 816e5de to 37f6666 Compare September 25, 2025 01:50
@kateinoigakukun kateinoigakukun force-pushed the pr-0c2378f7dfa95d7b34c78412908eec9ace06e49b branch from 37f6666 to e998a21 Compare September 25, 2025 03:01
@paulocoutinhox paulocoutinhox merged commit d2a8757 into paulocoutinhox:master Sep 25, 2025
@paulocoutinhox
Copy link
Owner

Thanks. Can you test and send a test project to i add it to this project?

@kateinoigakukun
Copy link
Contributor Author

Sorry for taking time 🙇 I just prepared some scripts to perform a sanity check: https://gist.github.com/kateinoigakukun/987c75f987d4462baf8bac202012b02b#file-pdfium-lib-npm-pkg-md

@kateinoigakukun kateinoigakukun deleted the pr-0c2378f7dfa95d7b34c78412908eec9ace06e49b branch September 29, 2025 08:20
@paulocoutinhox
Copy link
Owner

New version launched, can you test? Ty.

@paulocoutinhox
Copy link
Owner

image

@paulocoutinhox
Copy link
Owner

✨ Support this project ✨

This open-source project takes a lot of time, energy, and effort to maintain and improve. If you find it useful and would like to help keep it alive, please consider supporting it.

Your contribution makes a real difference — it helps cover the countless hours of work, testing, and updates that go into making this project better for everyone.

You can sponsor through GitHub at https://github.com/sponsors/paulocoutinhox
or simply by clicking the "Sponsor" button on the repository.

Every donation, big or small, helps keep the project moving forward. Thank you for supporting open source! 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants