Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to include a PDFIUM logics inside a module. #83

Open
KameshRajendran opened this issue Feb 16, 2023 · 5 comments
Open

How to include a PDFIUM logics inside a module. #83

KameshRajendran opened this issue Feb 16, 2023 · 5 comments

Comments

@KameshRajendran
Copy link

KameshRajendran commented Feb 16, 2023

We have downloaded the pdfium-wasm.tgz file from the https://github.com/bblanchon/pdfium-binaries . We have tested that the pdfium-wasm\lib\pdfium.js file looks like below

image

in the same time we have checked your Web demo you used an pdfium.js file and it contains all the logics in a seperate module.
image

Can you please guide us to create a module contains the PDFIUM logics. Since we are facing an issue
bblanchon/pdfium-binaries#100

@Priestch
Copy link
Contributor

@KameshRajendran you can check #56 for some background.

@paulocoutinhox
Copy link
Owner

paulocoutinhox commented Feb 24, 2023

Hi,

As i see in your screenshot on your original issue, the problem is not related to PDFium but with Blazor (probably https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor) since the error is inside file _framework/blazor.webassembly.js.

If you want know how to load this PDFium library, see here:
https://github.com/paulocoutinhox/pdfium-lib/blob/master/extras/wasm/template/index.html

Thanks.

@Priestch
Copy link
Contributor

Priestch commented Feb 25, 2023

The error is caused by line 257 in the screenshot, the Module.arguments should not be accecced after line 258 ran.

The code in _framework/blazor.webassembly.js will load some donet.**.jsfile, it tries to modify the global Module object in this file, including code to access Module.arguments, So as expected, it will abort the program and throw the error.

I think the error is not related to any pdfium project, you may need to ask someone to figure out how to use Dotnet with a wasm module.

In this project, we only use the pdfium.js file, it exposes interfaces as a SDK. Demo code shows how to use these interfaces.

pdfium

@paulocoutinhox
Copy link
Owner

It was solved? Can i close?

@paulocoutinhox
Copy link
Owner

Hi,

I have updated everything.

You can now use the latest version.

I will close this issue on some days, because we don't have answers.

Thanks.

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

No branches or pull requests

3 participants