IsPdfWithTextualContent Method of Engine Object

This method finds out if any of the pages of PDF file contain text layer. If you need to convert multiple PDF files to searchable PDF, you can check for text layer, and simply copy the whole file if it contains text layer. However, note that the text layer can contain additional or irrelevant text, in which case it's still necessary to perform recognition if you need completely adequate text rendering of the document.

Syntax

C++

HRESULT IsPdfWithTextualContent(
  BSTR                    FileName,
  IImagePasswordCallback* Callback,
  VARIANT_BOOL*           Result
);
    

C#

bool IsPdfWithTextualContent(
  string                 FileName,
  IImagePasswordCallback Callback
);
    

Visual Basic .NET

Function IsPdfWithTextualContent( _
  FileName As String, _
  [Callback As IImagePasswordCallback = Nothing] _
) As Boolean
    

Parameters

FileName
[in] This variable contains the full path to the PDF file in which to detect the text layer.
Callback
[in] This variable refers to the interface of the user-implemented object of the type ImagePasswordCallback which is used to handle possible password requests for accessing PDF files. This parameter is optional and may be 0 in which case password-protected files cannot be checked.
Result
[out, retval] This parameter returns TRUE if at least one of the pages of the file has text layer, and FALSE if none of the pages contain text layer.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.

Remarks

If you are opening PDF files from disk, we recommend using this method and not the CheckTextLayer method of the FRDocument object or HasTextualContent property of the ImageDocument object. This method will work quicker because it will not actually open the file and represent it as FRDocument, but simply check the properties of PDF file for text layer.

See also

Engine

IImagePasswordCallback

24.03.2023 8:51:52

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.