26 January 2010

Quick Test Professional Automation with Adobe PDF Documents - II

Accessing the Adobe API


Set objAVdoc = CreateObject("AcroExch.AVDoc")

Here, we are creating an object of the Adobe API class AVDoc.


Set objAVdoc = CreateObject("AcroExch.App")
Here, we are creating an object of the Adobe API class App.



objAVdoc.Open "C:\PDFGenerator1.pdf","This is a Test"
This code above opens an adobe document from the given path and sets its title as 
“This is a Test”.

Set objAdobe = CreateObject("AcroExch.App")
Set activeDoc = objAdobe.GetActiveDoc
activeDoc.Maximize(1)
This code above gets the front-most opened and active adobe document and maximizes it.



No comments:

Post a Comment