Convert Multilayer PDF to PDF/A using Aspose.PDF for .NET - Process crashes with ArgumentException

Using Aspose PDF for .NET (v20.1.0) to convert a multi-layer PDF to PDF/A-2B churns for a very long time and then throws an exception.

Testfile used
Plankart Multi Layer.pdf (2.8 MB)

Postman screenshot of conversion test
psotman failed request PDFA-2B.png (39.0 KB)

The code used for conversion is very simple:
doc.Convert(logStream, PdfFormat.PDF_A_2B, ConvertErrorAction.Delete);
doc.Info.ModDate = DateTime.Now;
var options = new Aspose.Pdf.PdfSaveOptions
{
WarningHandler = Instance.CustomPdfWarningHandler ?? new HandlePdfWarnings()
};
doc.Save(destination, options);

The error message (part I can share) is below. Can’t do much about the content.

System.ArgumentException: An item with the same key has already been added. Key: 4294967295
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at #=zt9lq3Ay5DNvj2qMc_ohw4QgBz2GzHyT8sjy$gX9e2Nc8Lb4gho4FF1sigu5I.#=zl0skfbIW14HT()
at #=zPVmLPn3gtBa4QVKez_aeMdr6L6rUcrK_PZ$YccHsCv2T$eBC78dcrD8=.#=ztM2lXNQKEV9v(#=zxKfDCzq4uoYqestBGBCc24AUgCkScZvW2oyzmlL3i5PnqrBpBg== #=zJ51QdV4=, #=zu5eBw$LK3$Wzlx6oianc0KMvTnw32n$qAUOd3cB26JztJOhzKw== #=zWbIxiw$pHJU3)
at #=zPVmLPn3gtBa4QVKez_aeMdr6L6rUcrK_PZ$YccHsCv2T$eBC78dcrD8=.#=zw5BHfzw=()
at #=zPVmLPn3gtBa4QVKez_aeMdr6L6rUcrK_PZ$YccHsCv2T$eBC78dcrD8=.#=zTJ$iMCM=()
at #=zYHASK$I86ILLk06riQieclyzPmtgUT4NfskPhqKKGsmkjsS02$BZOh0=.#=zxxbd_i0=()
at #=zPVmLPn3gtBa4QVKez_aeMdr6L6rUcrK_PZ$YccHsCv2T$eBC78dcrD8=.#=zv3hrXjw=(XmlTextWriter #=z1MvBJzo=, PdfFormat #=zVcazA98=, Document #=zWmeYnso=, Boolean #=zrj2hjrCCPa_S, ConvertErrorAction #=zMoukO9s=)
at Aspose.Pdf.Document.#=zZzZdu9I=(XmlTextWriter #=z1MvBJzo=, PdfFormat #=zVcazA98=, Boolean #=zrj2hjrCCPa_S, ConvertErrorAction #=zMoukO9s=)
at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)

@robert.vabo

We were able to observe the issue in our environment while using Aspose.PDF for .NET 20.6 and logged it as PDFNET-48426 in our issue management system. We will further look into its details and keep you posted with the status of its resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hi. Any news on PDFNET-48426? This multi-layer issue is a problem we need a solution to. Hopefully you are able to fix it or we will need to rethink our solution.

@robert.vabo

We regret to share that earlier logged ticket is not yet resolved. Please note that we will surely work to fix it - however, the issues in free support model are resolve don first come first serve basis. We surely understand your concerns and will take care of them during investigation. We will inform you soon as we have some certain updates regarding ticket resolution. Please have patience and give us some time.

We are sorry for the inconvenience.

Did you ever find any solution to this Robert?

@Robert_Karlsson

Regretfully, the ticket could not get resolved due to other issues in the queue logged prior to it. However, we have recorded your concerns and will surely inform you in this forum thread as soon as the ticket is resolved.

We apologize for the inconvenience.