Rank: Newbie Groups: Member
Joined: 7/30/2013 Posts: 1
|
I have two PDF documents and I want to find out if each page of one PDF is contained in the other PDF. I tried using the C# code below but it is using a Reference Comparison for the Equals method, and I need a Value Comparison. I am not sure how to go about this.
protected Boolean ExistingPdfContainsNewPdf(PdfDocument existingPdf, PdfDocument newPdf) { Boolean pageFound = false; foreach (PdfPage newPage in newPdf.Pages) { foreach (PdfPage existingPage in existingPdf.Pages) { if (newPage.Equals(existingPage)) { pageFound = true; break; } pageFound = false; } } return pageFound; }
Thank you very much.
|