Merge PDFS: losing Tags

I used below code to merge two pdf files.1.PDF (58.2 KB)
Expecting that generated pdf filemerged.pdf (115.5 KB)
will preserve the tags. But we are losing tag information when we create a merged pdf. Kindly help. Thank you.

PdfFileEditor pdfEditor = new PdfFileEditor();
pdfEditor.setCopyLogicalStructure(true);
pdfEditor.setCopyOutlines(true);
pdfEditor.concatenate(“1.pdf”, “1.pdf”, “merged.pdf”);

@vijji

Thank you for contacting support.

We have investigated the data shared by you and have figured out that shared PDF document 1.PDF is not a tagged PDF document which can be verified from Document properties as well as from Tags option under View menu so generated document can not be a Tagged document either. 1.JPG

We hope this will be helpful. Please feel free to contact us if you need any further assistance.

Hi Team,
I was facing a similar issue. I used the same code and after generation only the tags of page 1 is present the tags of page 2 is not present. Please find additional details below
T1 and T2 are two sample pdfs I used. Each of these is a single page pdf which should have two tags each(one for text and another for the form fields). T3 is the pdf generated and this only has the tags of the first pdf(ie, T1) whereas ideally we should get the tags of both pdfs.

Code snippet
PdfFileEditor pdfEditor = new PdfFileEditor();
pdfEditor.setCopyLogicalStructure(true);
pdfEditor.setCopyOutlines(true);
pdfEditor.concatenate(“”, “", “”);
T3.pdf (778.9 KB)

T1.pdf (386.1 KB)

T2.pdf (400.1 KB)

image.png (8.0 KB)

@a.b.r.p

Would you please check the attached file generated in our environment and share the screenshot with us?
output23.11.pdf (482.7 KB)

Hi ,
Its showing this file is private and I am unable to view it.

@a.b.r.p