How is your experience with the OutSystems Community?
7
Views
0
Comments
PDFJSViewerReactive - "file origin does not match viewer's" when loading PDF
Discussion

Hi everyone,


https://www.outsystems.com/forge/component-overview/7529/pdfjs-viewer-reactive-o11

I am working on an OutSystems 11 Reactive Mobile application and I'm trying to display PDF files using the PDFJSViewerReactive component.

The PDF files are stored in AWS S3 and are accessed through CloudFront signed URLs.

The signed URL works correctly when I open it directly in the browser, but when I pass the same URL to PDFJSViewerReactive, I get the following error:

PDF.js v2.16.105 (build: 172ccdbe5)Message: file origin does not match viewer's



Example URL structure:

https:///medialibrary/SGP/.pdf?Expires=...&Signature=...&Key-Pair-Id=...


I tried passing the CloudFront origin through HostsList, for example:

https://<cloudfront-domain>

However, I am still getting:

file origin does not match viewer's



Thanks,

Gokulprasanth M

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.