how to write the content obtained using the method GetPdfText - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: how to write the content obtained using the method GetPdfText (/Thread-how-to-write-the-content-obtained-using-the-method-GetPdfText--8964) |
how to write the content obtained using the method GetPdfText - Anisha - 10-25-2017 In the below code Set oPDF=CreateObject("LearnQuickTest.ManipulatePDF") Set FSO = CreateObject("Scripting.FileSystemObject") detailvalue=oPDF.GetPdfText("D:\POC\sample.pdf") detailvalue is a string but when i debug detailvalue is empty string. When i write 'detailvalue' into a text file its is getting written but not readable using QTP, but when i open text file manually i can see the content Please advise how to convert the oPDF.GetPdfText("D:\POC\sample.pdf") to a readable string. RE: how to write the content obtained using the method GetPdfText - zunebuggy - 11-20-2017 Code: Print oPDF.GetPdfText ("D:\POC\sample.pdf", 1,2) I hope this solution works for you. I have not tried it myself but found several examples and this appears to be the syntax. Also I think some types of PDFs have protection turned on and may not return any text or partial text if this is the case. In your example: detailvalue = oPDF.GetPdfText ("D:\POC\sample.pdf", 1,2) |