5

I am aware that pdfium exposes a javascript API (see this question). But I can't find how to call those functions. On a page with a rendered PDF I can see an embed tag, but I don't know what to do with it.

var p =  document.getElementsByTagName('embed')[0]

Gives me this:

function anonymous()
 __proto__: Object
 <function scope>

And in the source code of the Chrome extension, there is this function in 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) {...}

But it only allows the 'selectAll' message.

I would really appreciate if anyone can tell me where can I read more info on this or how to interact with pdfium with javascript

Community
  • 1
  • 1

1 Answers1

1

Lu Wang wrote a javascript library for PDFium based on the UI of pdf.js: Source code on github of PDFium.js

Michael W. Czechowski
  • 3,366
  • 2
  • 23
  • 50
  • 1
    I also would appriciate more support for javascript. But the developer of PDFium.js looks unavailable. Maybe we should ask more developers to raise the JS support of PDFium. – Michael W. Czechowski Feb 14 '16 at 16:02