Not able to include my css file while creating webviewer instance

Hi,

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?

Thanks
Rakesh

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.
www.pdftron.com