PDF wasm files are getting loaded twice

Product: PDF Tron

Product Version:8.11.0

Please give a brief summary of your issue:
(Think of this as an email subject)
PDFNetCWasm.br.wasm files are getting loaded twice, which increases resource download size(2.4 MB)

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

Hi @p.kk,

Welcome to the forums!

Can you provide us more information about your issue?

  1. Can you share a screenshot of the network tab? Is it only PDFNetCWasm.br.wasm that is loaded twice?
  2. Is there a URL where we can access your project to reproduce your issue?
    • Or can you share with us a sample of your project to see if we can reproduce?
  3. Any other information you might think is useful?

Thank you,

Adam
Web Developer
PDFTron

Hi Adam,

Hi @p.kk,

Thanks for sharing that screenshot. It’s possible the configuration of WebViewer is causing the WASM file to be loaded twice. Please share with us sample code of your project - specifically how you initialize WebViewer and any other setup code afterwards. Then we can investigate further on our side.

Adam

HI Adam,
I am trying it with NextJS framework. Attaching here the pages folder. Inside that pdfviewer.tsx is the component where I integrated PDFtron. (Not uploading the full project because of size constarints).

pages.zip (2.5 KB)

I get Error: Two instances of WebViewer were created on the same HTML element. Please create a new element for each instance of WebViewer.
Could you please look into this as well?[quote=“p.kk, post:1, topic:7559, full:true”]
Product: PDF Tron

Product Version:8.11.0

Please give a brief summary of your issue:
(Think of this as an email subject)
PDFNetCWasm.br.wasm files are getting loaded twice, which increases resource download size(2.4 MB)

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:
[/quote]

Hi @p.kk

Thanks for providing us some sample code and clarifying you’re using NextJS! We’ll have a look on our end and provide you with an update when we have more information.

Adam

Hi @p.kk,

I was informed you’ve been in contact with another one of our support agents over email. I’ll close this ticket for now.

Adam