Table of contents

Contents



Official Content

Extracting the text content of a PDF can be useful if your application generates these documents.

Typically is used combined with assertions to let GXtest check for expected content within the document. Take into account that this command retrieves all the text inside a PDF file, you must extract and process the particular piece of information you want to validate. Regular expressions are a good asset to do such tasks.

GetTextFromPDF

Gets the text from the PDF in the given path.

Syntax

&myVar = &driver.GetTextFromPDF("C:\mypdf.pdf")

Where:

&myVar
   
Is a variable based on the VarChar data type.

&driver
   Is a variable based on the Webdriver, GXtest external object.

Parameters

  • Path: the path of the PDF to extract text from.

Availability

Since GeneXus 17 Upgrade 10.

Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant