How to merge accessible pdf files

I have to concatenate several pdf files with accessibility, into one merged pdf file,
Is it possible without loosing the accessibility of the files?

@partnercomm

Please try to use the below code snippet and let us know in case you face any issues:

PdfFileEditor pfe = new PdfFileEditor();
string[] files = Directory.GetFiles(dataDir);
pfe.CopyOutlines = true;
pfe.CopyLogicalStructure = true;
pfe.Concatenate(files, dataDir + "CopyOutline_out.pdf"); 

Hi
Thank you
It works.
The accessibility of the origin files is kept, and the concatenated file passes successfully the screen reader.

@partnercomm

Thanks for the feedback. Please keep using our API and feel free to create a new topic in case you need any kind of assistance.

Hi
I’ve noticed that the merged pdf file size is 3 times larger then the two origin files.
What can I do to leave the size the same?
Thank you.

@partnercomm

You can optimize the output PDF document in order to reduce its size:

Hi Team,

After concatenate is there possible to add tagged page numbers to that merged pdf ?

Thanks

@Venkateshwaran

Would you kindly share the final merged document for our reference that already has accessibility features? We will check the feasibility to add tagged page number stamp in it and share our feedback with you.

The thing is when I merge two tagged pdf it’s retaining the itaggedcontent interface get value. But when I try with more than three files am getting error like " item key already exists in the document." Is there any way to resolve that ?

@Venkateshwaran

In order to investigate and fix this issue, we need to replicate it in our environment. Can you please share your sample PDF files for our reference so that we can test the scenario in our environment and address it accordingly?

Since we have lot private contents there is no possibility of sharing the pdf document. Is there any other way for the add tagged page number to merged pdf.

@Venkateshwaran

We are checking it and will get back to you shortly.

Ok sure, thanks

Hi Asad,

Is there any update regarding tagged page numbers.

@Venkateshwaran

We are afraid that we could collect the information to add tagged page numbers yet. A workaround can be to use text stamp and add page numbers in PDF and then convert the document into PDF/UA for accessibility. However, this workaround does not seem reliable. Therefore, we are performing some initial investigation and let you know as soon as we have some updates to share.

@Venkateshwaran

We would like to request you a sample tagged PDF document from your side so that we can try to investigate the possibility of adding tagged page numbers inside it. Would you kindly share one so that we can proceed with the investigation?