pdf

Provides generic methods for working with PDF files.

Methods

assert(path, text, pageNum, message)

Asserts that text is present in a PDF file

Parameters:
Name Type Description
path String Absolute path to the PDF file.
text String Text to assert.
pageNum Number= optionalPage number.
message String= optionalMessage to throw if assertion fails.

assertNot(path, text, pageNum, message)

Asserts that text is not present in a PDF file

Parameters:
Name Type Description
path String Absolute path to the pdf file.
text String Text to assert.
pageNum Number= optionalPage number.
message String= optionalMessage to throw if assertion fails.

count(path, text, pageNum)→ {Number}

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

Parameters:
Name Type Description
path String Absolute path to the pdf file.
text String Text to count.
pageNum Number= optionalPage number.
Returns:
Number - Number of times the specified text was found.