问题
I am facing a problem while showing a pdf in Google Chrome. The issue is that Chrome shows some pages of the pdf as black.
This happens when Chrome PDF Viewer is enabled. If I disable this plug-in and use Adobe PDF Plug-In it works fine.
Is there any way to show a PDF in Google Chrome using the Adobe PDF Plug-In only.
AS I am showing PDF using an HTML object tag, is there any parameter which forces Chrome to show the PDF using Adobe PDF Plug-In?
回答1:
There's no way for a website to force the browser to use one renderer or another: those decisions are all made client-side. As you noted, disabling the Chrome PDF plugin bubbles the Adobe plugin to the top, but that's a decision the user would have to make.
That said, if you have a PDF with rendering issues that you can share, please file a bug at http://new.crbug.com/. I'll be happy to put it in front of the correct team for triage.
回答2:
The only way that you can be 100% that all users can open your PDF correctly currently, is to force that the PDF is downloaded.
Use some headers within your apache or backend.
Example for Apache https://stackoverflow.com/a/11991050/3086639
来源:https://stackoverflow.com/questions/9615751/how-to-force-to-show-pdf-in-google-chrome-using-adobe-pdf-plug-in-only