I am trying to display some PDF documents on my webpage, but I keep getting Failed to load PDF document
in my browser. I have tried it in both Google Chrome and Mozilla Firefox (both latest versions). Whenever I inspect the object, and I open the src url directly in my browser, the path is correct and it downloads the PDF file.
Here's the code I'm using:
<object data="https://example.com/_f/user/pdf/my_file.pdf" type="application/pdf" width="100%" height="100%">
<p>Alternative text</p>
</object>
Update
I have found an solution here on StackOverflow that I have used. Works great!