Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Fri Oct 05, 2018 2:24 pm
I have a project requirement to compare pdf files and list the changes (non-GUI). We create templates which are sent to our print shop and merged with data files that are sent. What we are attempting to do is write code that will compare our template to a sample pdf sent back from our printer and verify that the only changes in the sample doc are the merged data fields which should be returned as a list. Would Spire.PDF be a good fit for this and if so, are there any existing examples that could be referenced?
-

mbanks
-
- Posts: 1
- Joined: Wed Aug 29, 2018 4:08 pm
Mon Oct 08, 2018 2:55 am
Hello Michael,
Thanks for your inquiry.
I'm sorry our Spire.PDF can't achieve your demand. If you have other questions, please feel free to write back.
Sincerely,
Lisa
E-iceblue support team
-


Lisa.Li
-
- Posts: 1533
- Joined: Wed Apr 25, 2018 3:20 am
Mon Aug 07, 2023 6:12 am
Hello,
Glad to inform that our latest Spire.PDF Pack(Hot Fix) Version:9.7.17 supports the comparison function, please download it from the following links and refer to the sample code to test.
Website link:
https://www.e-iceblue.com/Download/down ... t-now.htmlNuget link:
https://www.nuget.org/packages/Spire.PDF/9.7.17- Code: Select all
PdfDocument pdf1 = new PdfDocument(inputFile_1);
PdfDocument pdf2 = new PdfDocument(inputFile_2);
PdfComparer compare = new PdfComparer(pdf1, pdf2);
compare.Options.SetPageRanges(0, pdf1.Pages.Count - 1, 0, pdf2.Pages.Count - 1);
compare.Compare(outputFile);
Sincerely,
Lisa
E-iceblue support team
-


Lisa.Li
-
- Posts: 1533
- Joined: Wed Apr 25, 2018 3:20 am