Not able to include my css file while creating webviewer instance

Skip to first unread message

rakesh mishra

Feb 25, 2021, 3:53:16 PM2/25/21
to PDFTron WebViewer

I need to implement my own UI element inside webviewer and for same I need my customized css. While creating instance of webviewer I'm passing my css file location as css parameter of webviewer constructor, but I'm getting 404 error. Please find screen shot of my network window for ref. How to resolve this issue, if it's cross origin problem then how can I make styles available for my customized elements in webviewer iframe?


Andrew Yip

Feb 26, 2021, 1:48:45 PM2/26/21
to PDFTron WebViewer
Hi Rakesh,

Thank you for contacting us regarding WebViewer! It sounds like the path to your CSS file is wrong. Can I get more information above your setup:

- What does your network tab look like (where is it trying to load the CSS file from)?
- What path are you telling WebViewer to get the CSS file from?
- What does your file structure look like?

Thank you

Best Regards,
Andrew Yip
Software Developer
PDFTron Systems, Inc.
Reply all
Reply to author
Message has been deleted
0 new messages