Hi Wim,
Are you working with a URL or Mendix File document? I might thet the PDF viewer uses an iframe, and the origins shouldmatch
Cheers, Andries
Hi Wim, I ran into the same issue with error: Refused to display ..widgets/FileDocumentViewer/lib/pdfjs/web/viewer.html?file=.. in a frame because it set 'X-Frame-Options' to 'sameorigin'.
While I didn't solve the issue, here are the things I learned so far. The reason for using the PDF.js library is because Android does not have a builtin PDF viewer, unlike iOS.
The widget works fine in a browser on dekstop or phone, but not on your mobile app. If I understand correctly this is because of the cross domain request, see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-xhr
This widget unfortunately tries to open using the filesystem which is not allowed because file:// does not work in hybrid anymore. Please note that this is a web widget.
Regards
Diego