Page have not room to place a paragraphs

Hi!

I have to following code to compare pdf files:

public static class PDFCompareController
{
private static string licensePath = ConfigurationManager.AppSettings[“Workingdir”] + “/GroupDocs.Comparison.NET.lic”;
public static bool check(string bron, String doel, string result)
{
GroupDocs.Comparison.License license = new GroupDocs.Comparison.License();
license.SetLicense(licensePath);
ChangeInfo[] changes = null;
using (Comparer comparer = new Comparer(bron))
{

            comparer.Add(doel);
            comparer.Compare(result);
            changes = comparer.GetChanges();
            comparer.Dispose();


        }
       
        if (changes.Length > 0)
        {
            return false;
        }
        else
        {
            return true;
        }
        changes = null;
    }

Compare seems to work but when
having documents with tables(i could send the docments i try to compare) i get the following exception: Page have not room to place a paragraphs.

I would like to have a fix for this.

kind regards,

Jeroen Bossenbroek

1 Like

@jerbosuwv

Could you please share following details:

  • GroupDocs.Conversion for .NET API version that you are using
  • Problematic source and target files
  • Development environment details (e.g. .NET version, OS details)

Hi Tamir,

Thanks for your response.

Hereby the information.

· GroupDocs.Conversion for .NET API version that you are using: GroupDocs.Comparison 24.3.0

· Problematic source and target files: see files

· Development environment details (e.g. .NET version, OS details) : Microsoft Windows Server 2019 Standard, .Net Framework 4.8

Kind regards,

Jeroen

WIAKCCFormulieren.WIAKCCAanvraagWIA1-1.pdf (149 KB)

WIAKCCFormulieren.WIAKCCAanvraagWIA1.pdf (148 KB)

1 Like

@jerbosuwv
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): COMPARISONNET-3958

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as COMPARISONNET-3958) have been fixed in this update. This message was posted using Bugs notification tool by anton.samarskyy

After installing the newer version i get the following error:

Could not load file or assembly ‘System.Drawing.Common, Version=4.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The system cannot find the file specified…

Why is it asking for a deprecated version?

And how do i solve this?

Well downgraded the System.Drawing.Common and now the following exception:
The type initializer for ‘Aspose.Pdf.XmpField’ threw an exception

some more logging:
The type initializer for ‘Aspose.Pdf.XmpField’ threw an exception. The type initializer for ‘Aspose.Pdf.XmpValue’ threw an exception. at Aspose.Pdf.XmpField.get_Empty()
at #=zdOLCm3mUhfkwdiCMYC5ANgLss7hTfBAFkY5JIMU=…ctor(#=zuzVNoakvmO7FKtVYuVKgoM9cVI65aPdFHAPPudc= #=zEFfoSmo=, Boolean #=z_Hi6KyVmvyyI)
at #=z_rTvZnPcGrZNDTn3cCzBgZmDDVLZ4oUnjwdc8Ro=…ctor()
at #=z$IMHLTT6XB2gwNQXBheFyo90ajOoiOtAVYVJsUc=…ctor()
at #=z7OYuAG6f2B6JknBGFTA5vFz1aCgt6MVylHWQoYo=.#=zZTKGr0xqNsTf()
at #=zwiHnLPO_pZ01jMkPUb7Sieg1JxTdVDWsul3ecjQaiKt4…ctor(#=zqv9Ie2eWCbughkRzPQLY6qSDeFdh #=zLcBpNpM=, #=zNlXqjqNz0HpTaLoyRkQsQ2WmHlx$Iu3rWg== #=z2gjj94w=, #=zU9Vh7gAU4ZMIdpayEFMv6gxhqTuqYBtuz8Oe2ME= #=zAdmSA0cywQaq)
at #=zb4x1ZjNtomqLO6WKZLqqLSyMfSPbcBdMGcd1irg=.#=zCH0X7k3JtbuI(#=zqv9Ie2eWCbughkRzPQLY6qSDeFdh #=zLcBpNpM=, #=zNlXqjqNz0HpTaLoyRkQsQ2WmHlx$Iu3rWg== #=z2gjj94w=, #=zU9Vh7gAU4ZMIdpayEFMv6gxhqTuqYBtuz8Oe2ME= #=zAdmSA0cywQaq)
at Aspose.Pdf.Page.CalculateContentBBox()
at  …ctor(Page )
at  .(Page )
at  …ctor(Page )
at  . ()
at  .( )
at  . ( , CompareOptions , SaveOptions )
at GroupDocs.Comparison.Comparer.(Stream , Document , Document , CompareOptions , SaveOptions ,  )
at GroupDocs.Comparison.Comparer.Compare(Stream document, SaveOptions saveOptions, CompareOptions compareOptions)
at GroupDocs.Comparison.Comparer.Compare(String filePath)
at UWV.OM.TEST.Teststeps.PDFCompare.PDFCompareController.check(String bron, String doel, String result)
at UWV.OM.TEST.Teststeps.PDFCompare.PDFCompareController.checkDirs(String bronDir, String doelDir, String resultDir)

@jerbosuwv

We are investigating this scenario. You’ll be notified in case of any update.

Found the problem. Had to reference the package: System.Text.Encoding.CodePages.

See to work correct now.

Thanks!

A post was split to a new topic: PDF comparison is taking a long time in .NET

@jerbosuwv

Good to know that the issue is fixed.