Hello Everyone,
I am using a robot framework. I am trying to compare two PDF documents. The PDFs contain the medical details including tables, points, values, dates, images, etc.
Here, the process is, that when we enter the source document of the medical information, the system generates the output as its summary. So I want to compare summary documents with their source documents.
To do this, I tried with DiffLibrary. I have tried with several codes.
Here is one of them. (I can provide other codes that I tried If you asked.)
*** Settings ***
Library SeleniumLibrary
Library DateTime
Library RequestsLibrary
Library Collections
Library String
Library DiffLibrary
Library OperatingSystem
Library BuiltIn
Library RPA.PDF
*** Test Cases ***
Compare Documents
${file1} Open PDF PDF_Files/SampleDoc1.pdf
close pdf
${file2} Open PDF PDF_Files/SampleDoc2.pdf
close pdf
Run Keyword If ${file1} === ${file2}
log to console Both PDF documents are identical
ELSE IF
log to console PDF documents are different
END
But it doesn’t work correctly. Is there any other library to compare the two PDFs? And if I do any wrong thing here, please be kind enough to guide me. Any advice and guidance would be greatly appreciated.