Document.TaggedContent throws "An item with the same key has already been added." exception


I have an issue with getting document.TaggedContent of a output file created by concatenating few documents on disk.
I have 3 PDF files placed on disk, where all 3 files are openable, have a TaggedContent available and pdfFileEditor.TryConcatenate returns true, but when I try to retrieve the TaggedContent from the output document I receive the following exception:
An item with the same key has already been added.”

Here’s the code snippet:

var inputFiles = new List<string>() {
var license = new Aspose.Pdf.License();

var outputFile = @"D:\TaggedContentIssue\output.pdf";

var pdfFileEditor = new PdfFileEditor()
	MergeDuplicateLayers = false,
	CopyOutlines = true,
	CopyLogicalStructure = true,
	KeepActions = false

pdfFileEditor.TryConcatenate(inputFiles.ToArray(), outputFile).Dump();

var outputDoc = new Aspose.Pdf.Document(outputFile);
var taggedContent = outputDoc.TaggedContent;

I attach 3 PDF documents that I used to concatenate with Aspose. Notice that after changing order of the document the exception is not thrown, but unfortunately it is not an available solution for us.

Best regards,
Artur Jeż (771.4 KB)

Thank you for writing to us and providing the code snippet and files to reproduce the exception.

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): PDFNET-53738

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.

Is there any information on when the fix will be available?

Unfortunately, I can’t give any predictions. As soon as there is any information, I will write.

@sergei.shibanov Hi, Are there any updates on this?

Unfortunately, nothing new yet. I checked the task with the current version of the library (sometimes it happens that errors go away due to fixes for other tasks), an exception also occurs. As soon as there is any new information on the task, I will inform you.

Hi, I tested this again recently, on Aspose.PDF version 24.2, and the problem persists - are there any plans to address the issue any soon?

Unfortunately, there are no changes to this issue yet. As soon as information appears on it, I will write to you.