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

Access Jso object

shivaleela
Registered: Jul 10 2006
Posts: 11

Hi All,
 
Pls help me to solve this problem.
I am tring to access Acrobat PDF through VB.NET Ok.
 
Through reference i am adding Acrobat Library.
 
i.e.
 
Add Reference - Com - Adobe Acrobat 7.0 Type Library
 
Dim app As Acrobat.CAcroApp
Dim pddoc As Acrobat.CAcroPDDoc
Dim avdoc As Acrobat.CAcroAVDoc
Dim jsoobj As Object
 
In Form load, I am creating the instance of class
 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
app = CreateObject("AcroExch.App")
app.Show()
pddoc = CreateObject("AcroExch.PDDoc")
avdoc = CreateObject("AcroExch.AVDoc")
End Sub
 
I opening the PDF file through button.
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Integer
pddoc.Open("D:\test\1.pdf")
app.Show()
jsoobj = pddoc.GetJSObject() - here we are accessing the acrobat JavaScript methods and properties
jsoobj. - here i should get all acrobat javascript methods, but i am not getting.
jsoobj.Equals
.GetHashCode
.GetType
.ReferenceEquals
.ToString
End Sub
 
When i access JSO object then i should get all javascript methods but i am not getting. What i am doing wrong? Please help me to solve this.
 
Thanks....

My Product Information:
Acrobat Pro 7.0.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The JSO object is not JavaScript and it does not execute JavaScript. It is a simple gateway into the Acrobat JS environment. You can access all of the Acrobat DOM functions and properties, plus any functions and properties you've defined, provided of course that there are equivalent VB types, and this is the key. You're executing VB not JavaScript.

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