Skip to content

Signed PAdES output strips PDF/UA accessibility tags from uploaded document #378

Description

@SachinthaHewawasam

Summary

When a tagged, PDF/UA-compliant PDF is uploaded and signed through the Direct API, the PAdES document returned by DirectClient.getPAdES() no longer contains the original PDF accessibility/tag structure.

The accessibility metadata and structure are lost regardless of whether the input PDF is fully PDF/UA compliant.

Environment

  • Library: signature-api-client-java

  • Version: 7.0.3

  • Signing API: Direct API

  • Client: DirectClient

Observed Behavior

We uploaded a PDF generated using openhtmltopdf with PDF/UA accessibility properties configured.

The following differences were observed between the original PDF and the signed PAdES:

Property | Original PDF | Signed PAdES -- | -- | -- Producer | openhtmltopdf | iText 7.1.17 (Signicat AS) /StructTreeRoot | Present | Absent /Lang | nb | Absent PDF/UA identifier (pdfuaid) | Present | Absent DisplayDocTitle | true | Absent Page content | Normal page content | 13 flattened Form XObjects

The returned signed document is a PDF/A-3B document in which each page has been converted into a flattened Form XObject.

The original PDF is embedded in the signed document as:

Original-document-1.pdf

However, the tag structure from the original document is not present in the resulting signed PDF.

Reproduction / Verification

We verified that this behavior is not specific to the PDF generation or merge process by performing two separate signing tests:

  1. Merged PDF

    • PDF was processed through pdfMergeActivity

    • The resulting PDF was then sent for signing

    • The signed output contained no PDF tag structure.

  2. Raw openhtmltopdf PDF

    • A PDF generated directly by openhtmltopdf

    • The input PDF was fully PDF/UA compliant and contained /StructTreeRoot, /Lang, and pdfuaid

    • The PDF was sent directly to the signing API without any merge processing

    • The signed output again contained no PDF tag structure.

This indicates that the loss of the accessibility structure occurs during the signing/PAdES generation process rather than during our PDF generation or merge process.

Expected Behavior

Ideally, signing a PDF should preserve the existing PDF accessibility structure, including, where applicable:

  • /StructTreeRoot

  • /Lang

  • PDF/UA identification (pdfuaid)

  • DisplayDocTitle

  • Tagged page content and associated accessibility metadata

The signed PAdES should remain PDF/UA compliant when the input document is PDF/UA compliant, provided that the signing operation itself does not require changes that invalidate the accessibility structure.

Question / Feature Request

Could you please clarify whether there is:

  1. A configuration option or API parameter that allows the signing process to preserve the existing PDF tag structure?

  2. A supported way to generate a signed PAdES while retaining PDF/UA accessibility information?

  3. A planned feature or enhancement to preserve PDF/UA structures during PAdES signing?

If this behavior is controlled by the underlying signing infrastructure, could this issue be raised with the relevant signing/PAdES infrastructure team?

Impact

Our application is required to generate accessible documents in accordance with WCAG 2.1 AA and PDF/UA (ISO 14289) requirements.

The PDF submitted for signing is fully PDF/UA compliant. However, the signed document returned to the end user no longer contains the PDF tag structure required for accessibility.

As a result, accessibility is lost after the signing operation, which can prevent users relying on assistive technologies such as screen readers from accessing the signed document correctly.

Additional Information

We can provide the following artifacts if required:

  • Original PDF/UA-compliant input document

  • Signed PAdES output

  • PDF structure inspection results

  • Details of the signing requests used for both test cases

  • signature-api-client-java configuration

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions