PDF modules
The technology-specific modules for PDF perform specific tasks for the PDF technology.
PDF 1:1 Compare
This module compares two PDF files.
The success of a test case depends on the similarity between two files:
-
If the similarity is above a certain percentage, the test case passes.
-
If the similarity is below a certain percentage, the test case fails.
You can specify the following values when you use this module:
Value |
Description |
---|---|
Reference File |
Full path to the first PDF file, including the file name and extension. |
Reference File Password |
Password to open the first PDF file. |
Target File(s) |
File(s) you want to compare to the Reference File. |
Target File Password(s) |
Password(s) for decrypting the Target File(s). To specify multiple passwords, use a semicolon (;) as a separator. Moreover, note the following:
|
Accuracy [%] |
Minimum similarity in percent between the two files. |
Comparison Type |
Type of comparison that you want to perform:
|
Excluded Pages |
Optionally, specify the pages that you want to exclude from the comparison. To specify a page range, use a hyphen (-). To specify multiple pages or page ranges, use a semicolon (;). |
Excluded Areas |
Optionally, specify areas in your PDF files that you want to exclude from the comparison:
|
Excluded Text |
Optionally, specify patterns of text that you wish to exclude from the comparison. You can use regular expressions to specify unique patterns, if needed. We recommend you use Regular Expressions 101 (opens in new tab) to verify your regular expressions:
|
In this example, Tosca Cloud compares the text contents of the file ReferencePDF.pdf with the files Target_A.pdf and Target_B.pdf.
-
You expect that the files should be at least 80 percent similar.
-
You exclude page 1 and pages 3 to 4 from the comparison.
Compare two PDF files
Check PDF for Broken Links
This module checks for any links in a PDF file that return client error responses (400-499) or server error responses (500-599). This helps you verify whether there are broken links inside a document. You can specify the following values when you use this module:
Value |
Description |
---|---|
PDF File |
Complete path to the PDF file you want to verify. Example: C:\MyReports\YearlyReport.pdf. |
Ignore Errors |
Error code you want to ignore in your test. For example, enter 403 to ignore all links with a "Forbidden" response. |
In this example, Tosca Cloud checks TestPDF.pdf for broken links. It checks for all error types except 403 errors.
Check for error responses
You can find the list of broken links under Log info in Results:
Link verification test results
Barcode Reader
This module lets you verify or buffer the values of the following barcodes and QR codes in PDF files:
-
For barcodes: Code 39, Code 93, Code 128, EAN-8, EAN-13, UPC-A, UPC-E, ITF, Industrial 2 of 5, Inverted 2 of 5, IATA, Add 2, Add 5, Matrix 2 of 5, Datalogic 2 of 5, Codabar, BCD Matrix.
-
For QR codes: QR, Micro QR, Data Matrix, PDF417, Aztec.
You can specify the following values when you use this module:
Value |
Description |
---|---|
PDF File |
Absolute path to the PDF file. |
Barcode - Type |
Type of barcode you want to scan:
|
Barcode - Page |
Optionally, specify which pages you want to check for barcodes or QR codes. If you leave this blank, Tosca Cloud checks all pages. |
Barcode - Index |
Optionally, specify the index of the barcode or QR code, to narrow down your matches. Enter one of these values:
|
Barcode - Value |
Specify the action you want to perform:
|
Extract Links
This module lets you extract and buffer links inside a PDF file into an array. You can then use your buffered links in other test steps. Tosca Cloud automatically finds all the links, so there's no need to scan the PDF file. You can specify the following values when you use this module:
Value |
Description |
---|---|
PDF File |
Absolute path to the PDF file. |
Barcode - Type |
Type of barcode you want to scan:
|
Barcode - Page |
Optionally, specify which pages you want to check for barcodes or QR codes. If you leave this blank, Tosca Cloud checks all pages. |
Barcode - Index |
Optionally, specify the index of the barcode or QR code, to narrow down your matches. Enter one of these values:
|
Barcode - Value |
Specify the action you want to perform:
|