Where's the source code to the native PDF viewer in Google Chrome?

岁酱吖の 提交于 2020-01-12 03:29:10

问题


Can't seem to find it in trunk. Is this actually part of the open-source Chromium project? Or is the source to this not actually released? Only mention I could find:

http://www.listware.net/201007/chromium-discuss/93274-chromium-discuss-chrome-pdf-viewer-source.html


回答1:


Fetch it with Git:

  • $ git clone https://pdfium.googlesource.com/pdfium

View and contribute:

  • https://pdfium.googlesource.com/pdfium/+/master (Source browser)
  • https://pdfium.googlesource.com/pdfium/+/master/LICENSE (BSD 3-clause)
  • https://code.google.com/p/pdfium/ (Bug-tracker)



回答2:


Chromium just automatically embeds a page with PDF, the custom plugin is bundled up with Chrome. Adobe and Google has some mutual agreement:

You can right click and inspect the PDF Native Viewer to see yourself, you will see something like the following:

<html>
<body marginwidth="0" marginheight="0" bgcolor="rgb(38,38,38)">
<embed width="100%" height="100%" name="plugin" src="http://path/to/file.pdf" type="application/pdf">
</body>
</html>



回答3:


I just cite a snippet of the Chromium wiki (last updated on Nov 20, 2012):

The Chrome PDF plugin uses 3rd-party non-free code; no Free Software PDF plugin exists that supports all the PDF features we'd like (such as filling in forms). :(




回答4:


It is closed-source, just as native Flash plugin.



来源:https://stackoverflow.com/questions/3692598/wheres-the-source-code-to-the-native-pdf-viewer-in-google-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!