Free Support Forum - groupdocs.com

PDF comparison feature in .NET

Hi, I am using GroupDocs.Comparison API to compare and generate comparison result PDF but getting below error
“Evaluation Only. Created with Aspose.PDF. Copyright 2002-2018 Aspose Pty Ltd.”

Below is the code, I am using in windows .net application.

            string sourceDocumentPath = @"C:\WorkStation\Compare\ReprasentationForm.pdf"; // NOTE: Put here actual path to source document
            string targetDocumentPath = @"C:\WorkStation\Compare\UpdatedDeveen.pdf"; // NOTE: Put here actual path to source document
            string outputPath = @"C:\WorkStation\Compare.pdf"; // NOTE: Put here actual path to source document

            using (Comparer comparer = new Comparer(sourceDocumentPath))
            {
                comparer.Add(targetDocumentPath);
                comparer.Compare(outputPath);
            }

I am using evaluation version to understand how it works?
Please suggest…

1 Like

@hemantsudelehy

As you are evaluating the API without a license that is why you are facing this issue. Please have a look at the API evaluation limitations article. However, the good thing is, you can avail a temporary license on step 5 here . Please follow the steps given in the attached document/wizard in order to get a temporary license successfully - Wizard.zip (152.9 KB). Once you apply the license properly, you’ll get rid of the evaluation mark.

Hi i am using valid license expiring in 2021 but still facing issue
try
{
Aspose.Pdf.License license = new Aspose.Pdf.License();
// Initialize license object
license.SetLicense(“Aspose.Pdf.lic”);
string sourceDocumentPath = @“C:\WorkStation\Compare\ReprasentationForm.pdf”; // NOTE: Put here actual path to source document
string targetDocumentPath = @“C:\WorkStation\Compare\UpdatedDeveen.pdf”; // NOTE: Put here actual path to source document
string outputPath = @“C:\WorkStation\Compare.pdf”; // NOTE: Put here actual path to source document

            using (Comparer comparer = new Comparer(sourceDocumentPath))
            {
                comparer.Add(targetDocumentPath);
                comparer.Compare(outputPath);
            }
        }
        catch(Exception ex)
        {
            throw ex;
        }
1 Like

@hemantsudelehy

It seems that you are using Aspose.PDF for .NET and GroupDocs.Comparison for .NET APIs in the same project. In this case either you have to apply Conholdate.Total.NET license (this license is functional for both Aspose and GroupDocs APIs) or separate licenses for both APIs. Because Aspose.Pdf license is not applicable for GroupDocs.Comparison API.
In either case, you will initialize license objects as below:

//apply or load license for Aspose.Pdf
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(“Aspose.Pdf.lic”);
//apply or load license for GroupDocs.Comparison
GroupDocs.Comparison.License lic = new GroupDocs.Comparison.License();
lic.SetLicense("GroupDocs.Comparison.lic");

Does Aspose.Pdf have pdf comparision feature?

1 Like

@hemantsudelehy

No, API doesn’t support such a feature. However, it allows you to extract text from the PDF file. On the other hand, you can request a temporary license for GroupDocs.Comparison for it’s evaluation and initial testings. As you already have a Aspose.Pdf license, you can use both APIs with their licenses in a single application.

I am trying for a temporary license but it is not accepting my email id, not personnel or official.
Getting an error that provides business email.

I need to do a trial of this tool…

1 Like

@hemantsudelehy

We have created a thread on your behalf here. You’ll be guided about this issue soon.