Yes or No - Does Aspose PDF Java support loading from HTML save to PDF that will pass WCAG tests?

I can not find a definitive answer whether this should work or not.

I am using Aspose PDF for Java to create a Document based on html that itself is compliant. When I save it out as PDF, then test it using PAC.

I’m using 21.12 and this does not work.

I tried using the latest version and it does not appear to work in there either.

The existing related posts all seem to end with a ticket to fix these issues. Then they end. No indication of resolution.

So is there a way to make this work without having to write my own html to pdf conversion?

@rick-4

Can you please provide more details about the specific WCAG tests you are referring to and the issues you encountered when testing the generated PDF?

1 Like

“Text object not tagged” is the primary failure. But there are many X not tagged failures as well.

Follow up question: If Aspose.PDF for Java can not create a WCAG compliant PDF when loading from html content, then what are my options?

A. Can I post process the resulting PDF document structure to 1. add in tags or 2. repace existing content with thier tagged equivalent?

B. Build my own PDF from scratch including the ‘ITaggedContent’ based tags?

I would prefer A. since we reuse the html that renders the document in the web app and for the PDF view so we do not have to implement this twice.

@rick-4

If we understood your requirements correctly, you expect API to generate WCAG compliant PDF from input HTML without getting worrying about respective HTML tags being converted into Tagged elements in the output PDF document. Please confirm if our understanding are correct?

Yes. I want to be able to provide WCAG compliant PDF output from WCAG compliant HTML input.

@rick-4

We are afraid that this feature is yet to be investigated for the feasibility. Can you please provide us a sample HTML and expected output PDF for our reference? We will log a feature request in our issue tracking system and share the ID with you.