Product Version: 3.0.4
Please give a brief summary of your issue:
(Think of this as an email subject)
Following the basic demo on webviewer-html results in 404
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
I am trying out @pdftron/webviewer-html - npm to see if it can work within our react project for our use case. We need a way of converting complex html to pdf. I am trying to use this with a direct url for testing using the example on the npm page but always end up with a 404 within an iframe. How can i set this up as per the example and do you have a simple demo video that doesn’t have to use a server as the readme suggests it should be possible without?
Please provide a link to a minimal sample where the issue is reproducible:
Hmm, I am a bit unclear on your setup and the exact steps to reproduce this issue. I assume you have WebViewer running already and have the add-on set up as indicated in the guides.
I suspect you might be running into a CORS issue but I am unsure as you have only mentioned a “direct” URL. I would recommend checking the browser console as well as network panel for any errors and post them here.
The CORS issue is expected as if you are fetching a remote page (in a different domain) from your browser, it is considered a security issue. That is why we have included a section for this near the bottom of the readme on opening external links. It provides a link to a setup where a server application will scrape the site and serve the HTML within the same domain as your app to bypass cross-origin issues: GitHub - PDFTron/webviewer-html-annotate: Annotate live HTML web pages by providing URL.
Let me know if you could provide more details or whether this is the actual issue you are encountering.