0

Document Level Javascripts are a set of scripts that exist at the top of the Document's JavaScript structure. A PDF can have any number of Document Level scripts. These scripts are the first ones executed when the document is opened in Acrobat or Adobe Reader. Dojo javascript library presents a feature rich java library.

My question is how feasible is it to use dojo for Acrobat Document Level Javascript in PDF? I would like to embed the capabilities of dojo in PDF documents with Document Level Javascript.

Does Document Level Javascript integrate with a third party library like Dojo?

1 Answers1

0

Dojo is a JavaScript framework for web development. It cannot be used inside a PDF document since the document object model the library operates with does not exist in the PDF file.

iPDFdev
  • 5,229
  • 2
  • 17
  • 18
  • That's not entirely true. Dojo also works on Node.js which hasn't a DOM either. Dojo exists out of more modules than only the dojo/dom*. But I have no experience in PDF + JavaScript so no clue if it will work. – g00glen00b Aug 14 '13 at 13:14
  • If it includes modules that are pure JavaScript and do not rely on some external object model (for example some mathematical functions), then that code can be used inside a PDF document. – iPDFdev Aug 14 '13 at 13:25