在移动浏览器中显示使用 mpdf inline 生成的 pdf

Display pdf generated using mpdf inline in mobile browsers

有什么方法可以在移动浏览器中显示使用 mpdf inline 生成的 pdf 吗?

我完成了 mpdf documentation 并尝试了目的地选项 mpdf->output('filename.pdf','I')。它在除 IE 之外的桌面浏览器中运行良好,在 Firefox、Chrome 等移动浏览器中不起作用。它开始自动下载,而不是在桌面和所有移动浏览器的 IE 中显示内联。

有办法处理吗?

基于文档:
I:将文件内联发送到浏览器。如果可用,将使用该插件。当在 link 生成 PDF 时选择“另存为”选项时,将使用 $filename 给出的名称。

您需要在浏览器上安装插件才能嵌入 PDF 文档(桌面版和移动版)。如果您的浏览器没有安装PDF Viewer插件,将自动下载PDF文档。

您可以使用 Javascript 插件,例如 pdfJs 在跨浏览器中嵌入您的 PDF 文档。

我偶然发现了这个 Whosebug post. You can also try Google embeddable PDF Viewer

根据博客:

Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don't have to be uploaded to Google Docs, but they need to be available online.