I am converting an HTML document to a PDF document and I need to keep the accessibility tags for the generated PDF file. The input HTML document has valid accessibility that I confirm through file upload at Nu Html Checker
After the PDF document has been generated the document no longer has its accessibility features.
I have used the sample code from Aspose.
This is the exact code I have been using:
HtmlLoadOptions options = new HtmlLoadOptions();
var inputFilePass = Path.GetFullPath(@“…....\TestData\input_Pass.html”);
var output = Path.GetFullPath(@“…....\Output\output.PDF”);
Document pdfDocument = new Document(inputFilePass, options);
pdfDocument.Save(output);
I would really appreciate if anyone knows if it is possible to keep the accessibility features of the document when the document is converted from HTML to PDF.
After research more the Accesbility features, they are all related to the creation of a PDF, but not loading it. Here is the documentation of how to create a tagged Pdf if that may help you.
@carlos.molina
Thank you for your reply. I just want to make sure I understand you fully. The provided code sample from Aspose on how to convert an HTML document to a PDF document does not support accessibility. But I would need to create the PDF document as described in the “Create Tagged PDF”, correct?
I’m not an accessibility specialist, but I can quote the requirements. I hope it helps.
What is an accessible PDF?
PDF documents are required by the Digital Accessibility Policy to meet or exceed the Web Content Accessibility Guidelines (WCAG) 2.0 at level AA. In addition to sufficient color contrast, content structure, and similar WCAG Success Criteria, accessible PDFs make use of the features specified in the Universal Accessibility (PDF/UA) standard to “tag” documents, exposing their semantic structure to assistive technologies. This is very similar in concept to using semantic HTML elements and ARIA roles and attributes to make web pages accessible.
An investigation ticket as PDFNET-55495 has already been logged in our issue tracking system for this purpose. We have linked it with this forum thread so that you will receive a notification as soon as it is resolved. Please spare us some time.
I am looking for details/clarity on the same general topic on the state of AsposePDF and WCAG compliance. I’ve noticed there are a handful of forum posts on WCAG in general but I can’t tell if WCAG is fully supported or if it or some of it is still under development (or at all). Does anyone have clear answers (or links to details) on the following?
Can AsposePDF generate PDF from HTML/CSS that is WCAG compliant?
If AsposePDF HTML-to-PDF does have some WCAG compliance can anyone confirm if any of the following are included?
The feature is currently under the phase of the investigation. We are afraid that the support for the tags that you have asked has not been implemented yet. However, we have recorded your concerns and updated the ticket information accordingly. We will inform you as soon as it is available. Please be patient and spare us some time.