Merged PDF documents missing Accessibility standards

Hi Team,
We are using:
import com.groupdocs.merger.Merger;
import com.groupdocs.merger.domain.options.JoinOptions;

with below code ref to merge two pdf documents:

 Map<String, String> map1 = null;
        ByteArrayOutputStream mergedPdfOutputStream = new ByteArrayOutputStream();
        try {
            ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(inputPdfBytes);
            ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
            List<byte[]> pdfByteArrays =  producePdfByteArrays((Map<String, String>) objectInputStream.readObject());
            // Convert the first byte[] array to InputStream
            InputStream firstPdfInputStream = new ByteArrayInputStream(pdfByteArrays.get(0));
            // Create GroupDocs Merger instance with the first PDF
            Merger merger = new Merger(firstPdfInputStream);
            // Loop through the remaining byte[] arrays and merge them
            for (int i = 1; i < pdfByteArrays.size(); i++) {
                InputStream pdfInputStream = new ByteArrayInputStream(pdfByteArrays.get(i));
                merger.join(pdfInputStream, new JoinOptions());
                pdfInputStream.close();
            }
            // Merge and save the output PDF into ByteArrayOutputStream
            merger.save(mergedPdfOutputStream);
            //close first stream
            firstPdfInputStream.close();

Steps to reproduce:
Generate the Merged document. and check the accessibility checks and it generates report with failure.

Steps:

  1. Open the PDF in Adobe Acrobat Pro.
  2. Go to All Tools > Prepare for Accessibility > Check for Accessibility.
  3. Select the desired options and select, Start Checking.
  4. Review the Accessibility Report, which highlights errors, warnings, and suggestions.

See the checks are failed in below screenshot of report.
acc_merge_pds.jpeg.png (109.2 KB)

@pankajgupta

Could you please share the source and resulting PDF files with us?
Also, does this issue occur with specific PDFs or with all files?

hey @atir.tahir , thanks for responding.
pFA attached docs
[MERGED]Proposta_Contrattuale_ESTRA.pdf (1.1 MB)

individual reports.zip (19.7 KB)

Indivisdual Pdfs.zip (671.3 KB)

@pankajgupta
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): MERGERJAVA-547

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.

hey @atir.tahir Thanks for updating. Can you help me when can we expect this fix. We are from Salesforce with full license and need it on priority,

@pankajgupta

We are still investigating this issue. You’ll be notified as soon as there’s any update.

Hi @pankajgupta !

We’ve resolved most of the issues related to accessibility standards. At this point, the quality of the output document largely depends on the quality of the source files — if the source document is properly structured and compliant, the generated output will generally reflect that quality.
We’re aiming to release the updated Java version as soon as possible to deliver these fixes.

However, we are also working on a more stable and long-term solution. Our team has scheduled improvements to enhance the accessibility of the output documents and address as many known issues as possible.

Hey @yuriy.mazurchuk : Thanks for update.
Could you also throw light in which version can we expect it to be working.
Also, I have attached source file which has all accessibility standard and on merge somehow it’s lost. Could you please verify and confirm if t’s working with your recent and soon to be out update?

@yuriy.mazurchuk : Also its not for supporting new accesibility but to prevent the merged pdf from loosing already exisitng accessibility of pdfs.

Hi @pankajgupta !

Yes, you are right - the library will no longer lose existing accessibility. The release will be published within a few days - once we retest all changes and deploy it. I will notify here.

@yuriy.mazurchuk : Thank you. Could you please confirm on release date, that will help us plan our deliverables. Also, Could please verify the bug with attached docs in above threads?

hi yuri,
Please try to push it in the july release, because there are multiple high value customers waiting on this feature

Hi @amitdash , @pankajgupta !

The fixes are done in .NET and Java versions, we are running various tests and regressions to ensure for product stability. We plan to deploy the release early next week.

Thanks @yuriy.mazurchuk : Will verify with the latest version. Please notify us whenever it is available for consumption and the version number.

Hi @pankajgupta !

Please be aware that July 25.7 release was deployed with fix

https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-merger/25.7/

For the upcoming months we plan to implement additional fixes for the missing tags and include these fixes into .net and java releases as well.
Thank you!

Hi @yuriy.mazurchuk : I checked the merged file for the attached pdfs above with above provided 25.7 and still it has all accessibility lost compared to original docs. I can see only Bookmarks have passed when compared to old one. Please find the attached report.
cc: @amitdash
response.pdf (548.7 KB)

Screenshot 2025-07-25 at 5.31.41 PM.jpg (268.6 KB)

Hi @pankajgupta !

Thank you for the detailed update and report.
Let me analyze it and get back with the estimation of a more accurate fix delivery.

Thank you!

hi yuriy,
Please note that this is a critical issue for us and the customer is awaiting a fix. Please let us know the fix date at the earliest.

Hello,

We have tested the merging process using version 25.7 with the 7 PDF files you previously provided. The result was produced without any of the errors you mentioned.

If you used different documents for your recent test, please share them with us so we can investigate further.

Below is the code sample adapted to your case that we used during our testing:

import com.groupdocs.merger.Merger;
import com.groupdocs.merger.options.JoinOptions;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

public class PdfMergerApp {
    public static void main(String[] args) throws IOException {
        List<String> pdfFilePaths = List.of(
            "Condizioni_Generali_Fornitura_Estra.pdf",
            "Informativa_Privacy_Qualita_Commerciale.pdf",
            "Lettera_Accompagnamento_Plico_Contr.pdf",
            "Modulo_Dati_Catastali_Estra.pdf",
            "Modulo_Reclamo_Estra.pdf",
            "Modulo_Ripensamento_Estra.pdf",
            "Proposta_Fornitura_Estra_Luce.pdf"
        );

        List<byte[]> pdfByteArrays = new ArrayList<>();
        for (String path : pdfFilePaths) {
            byte[] bytes = Files.readAllBytes(Paths.get(path));
            pdfByteArrays.add(bytes);
        }

        ByteArrayOutputStream mergedPdfOutputStream = new ByteArrayOutputStream();

        try (InputStream firstPdfInputStream = new ByteArrayInputStream(pdfByteArrays.get(0))) {
            Merger merger = new Merger(firstPdfInputStream);

            for (int i = 1; i < pdfByteArrays.size(); i++) {
                try (InputStream pdfInputStream = new ByteArrayInputStream(pdfByteArrays.get(i))) {
                    merger.join(pdfInputStream, new JoinOptions());
                }
            }

            merger.save(mergedPdfOutputStream);
        } catch (Exception e) {
            throw new RuntimeException("Error 1", e);
        }

        try (FileOutputStream fos = new FileOutputStream("merged_output.pdf")) {
            mergedPdfOutputStream.writeTo(fos);
        }
    }
}

merged_output.pdf (864,5 КБ)

Please let’s double check the difference in the source code and input files to find out the difference to reproduce the problematic output file.
So far we can not reproduce the output document with mentioned Accesibility issues.

Hey @AlekseiSemenchenko : It’s bit surprising. I tried again with the provided 25.7 Merge and with same files as attached above in Individual Pdfs.zip and the out put is attached here:
response (2).pdf (687.7 KB)
with report:
Screenshot 2025-07-29 at 7.06.35 PM.jpg (268.6 KB)

You can see our code above, i don’t see any difference technically. Can you help us what could be the possible reasons of failures in our case?

Also, the merged file attached by you has still couple of failures though thankfully most passed
Screenshot 2025-07-29 at 6.56.45 PM.png (493.8 KB)