Showing posts from December, 2012

Automating PDF with QTP just got easier!

There are many ways in which pdfs can be automated , since it's been some time that I automated pdf related stuff; I found some new ways that are easier:

Apart from the older methods like:

For Adobe Reader:

Set rdrObj= createobject("AcroPDF.PDF")



Set rdrObj= Nothing
Note: This approach is good but has few options and can only be used for purposes like printing contents of the pdf file.

For Adobe Acrobat:

Set acrObj = CreateObject( "AcroExch.PDDoc" )

If acrObj .Open( FileName ) Then
       PagesinPdf = acrObj .GetNumPages()
       Set acrObj = Nothing
       PagesinPdf = -1
End If

Set acrObj = CreateObject("AFormAut.App")--to manipulate from pdf formsSet acrObj = CreateObject("AcroExch.App")--creating acrobat application objectSet acrObj = CreateObject("AcroExch.AVDoc")--one avdoc object per displayed document. The best method would be:

APTT - Adobe Pdf Test Toolkit