Compare PDFs
The Compare PDFs action in the Avo Assure is found under the @Generic Element is used to compare two provided PDF files. The results of this comparison highlight the differences or similarities between the files and save the result in dynamic variable.
Syntax
Input: <PDF_file_path1>;<PDF_file_path2>;<selective/all(optional)>;<pagewise/complete(Optional)>
Note:
Selective/all: By default, the final argument is set to ‘all,’ which stores the entire file's content in the dynamic variable. If changed to ‘selective’ only specific parts of the file will be stored in the dynamic variable.
pagewise: When the user selects ‘pagewise’ as the last argument, the comparison will be performed page by page (e.g., page 1 of PDF1 will be compared with page 1 of PDF2, page 2 of PDF 1 will be compared with page 2 of PDF2). By default, the last argument in the syntax will be set to ‘pagewise.’
complete: when the user selects ‘complete’ as the last argument, the comparison .This specifies that the comparison must be done with all pages (page 1 of PDF1 must be compared with all pages of PDF2, page 2 of PDF1 must be compared with all pages of PDF2, and so on)
<PDF_file_path1> (Required)
Specify the first PDF file path to compare.
<PDF_file_path2> (Required)
Specify the second PDF file path to compare with first PDF file
<selective/all> (Optional)
Optional extraction mode: • all – stores entire file content in dynamic variable • selective – stores only specific parts in dynamic variable
<pagewise/complete> (Optional)
Optional comparison mode: • pagewise – compares pages one-to-one (default) • complete – compares each page of PDF1 with all pages of PDF2
Note:
Table content within PDFs is not supported, it might show inconsistencies in result.
Empty pages or text not supported in compare PDFs.
Indicates any page-specific comparison results, if available.
Modification appear as follows:
1. Added content is displayed as ||++<content>++||
2. Deleted content is displayed as ||--<content>--||
Output Value
<Dynamic Variable>
This variable holds the comparison result (e.g., added/deleted content)
<Dynamic Variable>
This variable stores the status as True or False
Example
Performs content comparison between two PDF documents using the selected mode
The Compare PDFs action takes the value from the Input Value column (e.g., C:\Docs\original.pdf;C:\Docs\updated.pdf;all;pagewise) and compares the content of the specified PDF files based on the chosen comparison type. The result of the comparison operation is stored in the {Compare} variable, while the execution status is stored in the {Status} variable, with the following possible values:
True – if the PDFs are compared successfully.
False – if the PDFs differ or if an error occurs during comparison.
Note: After executing the Test Steps you can see the result in the Avo Assure Client console.
Last updated
Was this helpful?