How to compare pdf and word document and write it on new word file and create index file to find the difference
Hi @Melbin_Antu1 Once try with this activities
- Use ReadPdf activity
FileName=“path\to\your\pdf\document.pdf”
Result=“pdfText” - Use ReadTextFile activity
FilePath=“path\to\your\word\document.txt”
Result=“wordText” - Assign Activity
Value=“{String.Compare(pdfText, wordText)}”
To=“comparisonResult” - If Condition=“comparisonResult <> 0”
Then
WriteTextFile :
DisplayName=“Write Differences to Text File”
FilePath=“path\to\differences.txt”
Text=“Differences found: {wordText} vs {pdfText}”
WriteTextFile :
DisplayName=“Write Differences to New Word File”
FilePath=“path\to\new\word\document.docx”
Text=“Differences found: {wordText} vs {pdfText}”
Else
Log Message :
Message=“No differences found.” - Now, Use WriteTextFile
DisplayName=“Create Index File”
FilePath=“path\to\index\file.txt”
Text=“Index of differences: {path\to\differences.txt}, {path\to\new\word\document.docx}”