Footer content is not read by screenreaders

The footer of the document generated is not accessible. Link in the footer is not read by screen readers.
00000149_Version_2-1 (1).pdf (113.2 KB)

Font accessible file.docx (108.8 KB)

1 Like

@sunitha.hegde

Could you please share following details and we’ll investigate this issue:

  • Which API (e.g. GroupDocs.Conversion, GroupDocs.Viewer) and it’s version (e.g. 24.10) you are using?
  • Sample code
  • Development environment details (e.g. Java or .NET version, OS)

Hey @atir.tahir,

GroupDocs.Total for Java
3.0
Screenshot 2024-11-20 at 7.55.37 PM.png (10.4 KB)

@sunitha.hegde

Please share the conversion code as well.

Could you please tell which screen reader you are using? Link in the footer is readable for both files when opened in respective native applications image.png (18.7 KB).
Also, please specify if you are trying to convert a Word document to PDF or vice versa.

  • We have tried with NVDA and Macs inbuilt voice over.
  • Docx to PDF conversion
  • Code
    package com.example;

import com.groupdocs.conversion.Converter;
import com.groupdocs.conversion.ConverterSettings;
import com.groupdocs.conversion.contracts.ConverterSettingsProvider;
import com.groupdocs.conversion.contracts.documentinfo.IDocumentInfo;
import com.groupdocs.conversion.internal.c.a.w.FolderFontSource;
import com.groupdocs.conversion.internal.c.a.w.FontSourceBase;
import com.groupdocs.conversion.internal.c.a.w.SystemFontSource;
import com.groupdocs.conversion.internal.c.a.w.FontSettings;
import com.groupdocs.conversion.options.convert.PdfConvertOptions;
import com.groupdocs.conversion.options.convert.PdfDocumentInfo;
import com.groupdocs.conversion.options.convert.PdfOptions;
import com.groupdocs.conversion.options.load.WordProcessingLoadOptions;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;

import static jdk.xml.internal.SecuritySupport.getClassLoader;

public class Main {
public static void main(String[] args) {
System.out.println(“Hi”);
String filePath = “templateGDocs.docx”; // Replace with your file path
String outputFilePath = “output.pdf”;
try {
// Create a File object
File file = new File(filePath);

        String userHome = System.getProperty("user.home");
        String outputFilePathString = userHome + File.separator + "outputfile.docx";
        System.out.println(outputFilePathString);
        // Open an InputStream for the file
        try (InputStream inputStream = Main.class.getClassLoader().getResourceAsStream(filePath)) {

            WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
            // Below is required for adding Tags in the output PDF documnet
            loadOptions.setPreserveDocumentStructure(true);

           
            try (Converter converter = new Converter(() -> inputStream, () -> loadOptions)) {
                try (ByteArrayOutputStream ms = new ByteArrayOutputStream()) {
                    PdfConvertOptions convertOptions = new PdfConvertOptions();
                    PdfOptions pdfOptions = convertOptions.getPdfOptions();
                    pdfOptions.getFormattingOptions().setDisplayDocTitle(true);
                    PdfDocumentInfo pdfDocumentInfo = pdfOptions.getDocumentInfo();
                    pdfDocumentInfo.setTitle("Test");
                    converter.convert(() -> ms, convertOptions);
                    byte[] outputPdfBytes = ms.toByteArray();
                    System.out.println("Generated PDF content size in bytes: " + outputPdfBytes.length);
                    try (FileOutputStream fileOutputStream = new FileOutputStream(outputFilePath)) {
                        fileOutputStream.write(outputPdfBytes);
                        System.out.println("File created successfully!");
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            } catch (IOException e) {
                System.out.println(e.getMessage());
                throw e;
            }
        }
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}

}