These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat Object Model Reference

hemanshu
Registered: Jun 10 2009
Posts: 3

Hello there,
I am looking for any open source implementation of Acrobat Object Model, something along the lines of what John Resig did for javascript in [url=http://groups.google.com/group/envjs]HTLM DOM[/url]) So basically I am looking at an Acrobat Objects reference which I could use directly in my reader to render the javascript content's inside the pdf.(Which should be able to comprehend acrobat objects.)

I would greatly appreciate any help

Cheers,
Hemanshu

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Well, I think you may be a bit mistaken in you idea of how Acrobat, PDF, and JavaScript are put together, but I'm not sure.

By Acrobat Object Model Do you mean the Acrobat JavaScript DOM? The DOM does not follow the structure of the PDF directly. In fact, most of the PDF structure is not availible to the JavaScript DOM. The structure of a PDF is much, much richer and more complex that anything in HTML. JavaScript in a PDF is about controling interactive elements, like form fields. Not about describing all the content in a PDF, like you have in an HTML.

So you could very well create a tool that displays a tree of PDF objects that Acrobat JavaScript will recognize. But I don't know of anyone who has done this. Mostly because its not as useful as the same tool would be in HTML.

Is this what you are looking for?

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

hemanshu
Registered: Jun 10 2009
Posts: 3
Thanks Thomp for your reply,
Most of the javascript used in the acrobat work with the acroform objects , now as of now I couldn't find any open source pdf reader which is successful in rendering javascript and intern able to understand acrobat object ( Incidentally Foxit does works pretty well with javascript heavy pdf, but again that's another proprietary software)

for example if the javascript in the pdf does something like this
app.alert ("hello world ")
I want a reference tree for all Acroform objects and their methods and properties.


With DOM I was just trying to draw a parallel.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
"JavaScript for Acrobat API Reference":
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=JavaScript_SectionPage.70.1.php

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com