4
我知道pdfium公开了一个javascript API(see this question)。但我找不到如何调用这些函数。在带有渲染PDF的页面上,我可以看到一个嵌入标签,但我不知道该如何处理它。从javascript中调用pdfium(chrome native pdf viewer)
var p = document.getElementsByTagName('embed')[0]
给了我这样的:
function anonymous()
__proto__: Object
<function scope>
而且Chrome扩展程序的源代码,有这个功能pdf.js:
/**
* Handle a scripting message from outside the extension (typically sent by
* PDFScriptingAPI in a page containing the extension) to interact with the
* plugin.
* @param {MessageObject} message the message to handle.
*/
handleScriptingMessage: function(message) {...}
但只允许“选择所有'消息。
我会很感激,如果有人可以告诉我在哪里可以阅读本或如何更多信息以与pdfium交互使用JavaScript
我也会appriciate更多的支持JavaScript。但PDFium.js的开发人员看起来不可用。也许我们应该要求更多的开发者提高PDFium对JS的支持。 –