Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Monday, 28 September 2015

Reading data from "pdf" file...?


Set objPDF = CreateObject("Scripting.FileSystemObject")

Set temp = objPDF.GetFile("C:\62294_GT.pdf")

Msgbox temp.Size

set tf=temp.OpenAsTextStream

Set textfile =objPDF.CreateTextFile("C:\pdf.txt")

Do Until tf.AtEndOfStream
'strLine = tf.ReadLine
'print strLine

textfile.WriteLine(tf.ReadLine)
loop



Note:  to ensure acrobat reader already installed on your machine, otherwise need to install acrobat reader to create object for PDF using vb script.