About Me

Gaurav Seth is a a Senior Automation Test Analyst with experience in QTP, Selenium and Ranorex tools and currently working on Automating in C# for a FX trading Client

PDF Manipulation with QTP

We can Use LearnQuickTestPDF to Manipulate PDF Using QTP

Download http://www.mediafire.com/?y1ytzwmerly
and run exe to extract file to hard drive, extract to “C:\LearnQTP”.
Open directory LearnQuickTestPDF and find the Install.vbs, this will make the API ready to use. But before this, read the terms and conditions first and then execute the install.vbs file by double clicking it. Accept terms and condition by clicking on ‘Yes’ button and proceed. That’s it you are now ready to use this into QTP.

Use this in the same way you do with other COM APIs.

Once we get the object, we can now proceed with using different methods to manipulate the documents

Set oPDF=createobject("LearnQuickTest.ManipulatePDF")

1. ' Get the Text of PDF . The Second Parameter is the Start Page and Third End Page

Print oPDF.GetPdfText ("C:\LearnQTP\LearnQuickTestPDF\fw4.pdf", 1,2)

2. ' Get the No of Pages of the PDF
Print oPDF.GetNumberOfPages ("C:\LearnQTP\LearnQuickTestPDF\fw4.pdf")

2 comments:

  1. is thr any change to access run time PDF file

    ReplyDelete
  2. Excellent information, I have a problem, when trying to create the LearnQuickTest.ManipulatePDF object, it fails and throws the following message

    Instruction
    Set oPDF = createobject ("LearnQuickTest.ManipulatePDF")

    Error message
    ActiveX component can not create object: 'LearnQuickTest.ManipulatePDF'

    ReplyDelete