html显示base64的pdf,html - base64 embeded PDF files won't render in Chrome - Stack Overflow

Some PDF files won't render in Chrome browser but will render fine in Firefox. All files render fine in all browsers if emeded directly.

The confusing part is that the problem is only for some files and not all. Files are stored in a folder that is not public and that's why they are served as base64 for the user to view.

I tested the problematic files by using online base64 decoders and I get the same result. Rendered in FF, not rendered in Chrome.

I cannot share any of the PDF files. They are all from the same source, scanned from the same device, PDF version 1.4, 4 pages.

I have tried:

using iframe, embed and object (same result)

unblocking Insecure content in Chrome site settings

opening and re-saving in Adobe Acrobat

using online PDF analyzers to see if any problems present (none found)

你可能感兴趣的:(html显示base64的pdf,html - base64 embeded PDF files won't render in Chrome - Stack Overflow)