pdf

Provides generic methods for working with PDF files.

assert

Asserts that text is present in a PDF file

Parameters:

Name

Type

Description

pdfFilePath

String

Relative or absolute path to the PDF file.

text

String

Text to assert.

pageNum

Number

optional Page number.

message

String

optional Message to throw if assertion fails.

reverse

Boolean

optional Check also reverse variant of string.

assertNot

Asserts that text is not present in a PDF file

Parameters:

Name

Type

Description

pdfFilePath

String

Relative or absolute path to the pdf file.

text

String

Text to assert.

pageNum

Number

optional Page number.

message

String

optional Message to throw if assertion fails.

reverse

Boolean

optional Check also reverse variant of string.

count

Count the number of times specified text is present in a PDF file.

Parameters:

Name

Type

Description

pdfFilePath

String

Relative or absolute path to the pdf file.

text

String

Text to count.

pageNum

Number

optional Page number.

reverse

Boolean

optional Check also reverse variant of string.

Returns:

Number - Number of times the specified text was found.

Last updated