View Full Version : Acrobat JavaScript API

08-20-2007, 11:50 AM

Does anyone have any experience with Acrobat JavaScript API? In particularly, does anyone know how to script the Acrobat plug-in in Gecko browsers?

In IE this is as simple as getting the embedded PDF object by id and invoking one its native methods, e.g.

<object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf"></object>
<script language="JavaScript" type="text/javascript">
var objPdf = document.getElementById('pdf');

In FF this does not work. Neither does it work if the PDF is embedded in the embed element. Firebug - FF debugger add-on - indicates the print() function is not defined in either case.

But according to the plug-in projects documentation at mozilla.org plug-ins native methods can be called this way:

<embed type="application/plugin-mimetype">
<script language="javascript">
var embed = document.embeds[0];


Any comments much appreciated,

Adal Fraile

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum