PDF to Text Operation

Applies to TestComplete 15.63, last modified on April 10, 2024

Description

Use the PDF to Text operation to extract the text content of the entire PDF file. To do this, the operation uses optical character recognition.

When you add the operation to a keyword test, you specify the PDF file whose contents you want to recognize.

Requirements

  • Your TestComplete version must be 14.20 or later.

  • Your computer must have access to the ocr.api.dev.smartbear.com web service.

    If you have firewalls or proxies running in your network, they should allow your computer to access the web service. This web service is used to recognize the text content of PDF files.

  • Your firewall must allow traffic through port 443.

  • You need an active license for the TestComplete Intelligent Quality add-on.

  • The Intelligent Quality add-on must be enabled in TestComplete.

    You can enable the add-on during TestComplete installation. If you did not enable the add-on during the installation, you can do this at any moment later via the File > Install Extensions dialog. Select File > Install Extensions from the TestComplete main menu and enable the Intelligent Quality > Intelligent Quality Core plugin in the resulting dialog.

  • PDF to Text support must be enabled in TestComplete.

    By default, it is enabled automatically if you enable the Intelligent Quality add-on during TestComplete installation.

    If you experience issues with PDF support in your tests, select File > Install Extensions from the TestComplete main menu and make sure the PDF to Text plugin is enabled (you can find it in the Intelligent Quality group). If the plugin is disabled, enable it. In the confirmation message, click the link to read a third-party license agreement. If you agree to the license terms, click Enable OCR.

Operation Result

The operation returns a string containing the recognized text content.

Scripting Analogue

The operation is an analogue of the PDF.ConvertToText method.

Child Operations

The operation cannot have child operations.

Operation Parameters

The operation has the following parameters:

FileName

The fully-qualified name of the PDF file whose text content you want to get.

If the specified file is not a PDF file, an error will occur.

See Also

AI Category

Highlight search results