LibrePDF / OpenPDF

OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.
Other
3.56k stars 586 forks source link

PDF-UA AccessibilityProperties for building a tag-tree #181

Open tabibite opened 5 years ago

tabibite commented 5 years ago

I would like to create a tagged PDF and there I need to build a tag-tree. Is it possible with OpenPDF?

hvbtup commented 1 year ago

Eclipse BIRT uses OpenPDF for PDF generation. This project would also benefit from PDF/UA support in OpenPDF.

I think this is one important open source topic where the big players, governments, and the EU should pay some developer(s) for developing this.

christophersavory commented 1 year ago

@asturio, @bengolder, @daviddurand, @kulatamicuda, @rtfarte, @tlxtellef how difficult is it to add the tag-tree to OpenPDF?

hvbtup commented 1 year ago

AFAIK JasperReports already supports creating PDF/UA using OpenPDF. Can somebody confirm this? So it seems like OpenPDF can already create PDF/UA if used in the right way, and it's just a matter of missing examples.

christophersavory commented 1 year ago

@asturio Can OpenPDF already create a PDF/UA document or is it a feature that needs to be built in?

asturio commented 7 months ago

It should be possible to create "navigable" PDFs with OpenPDF. But there is no example code for that. I think flyingsaucer (using OpenPDF) can do this too.

anmeeks-vt-edu commented 7 months ago

I want to chime in with the others that some example code would be very helpful. I found a comment on S.O. where someone managed to add headings on a chunk in IText with:

Chunk heading = new Chunk("A guide to key terms\n " , font);
heading.setRole(PdfName.H1);

But there is no setRole in the OpenPDF Chunk class. As a novice user of OpenPDF, I really need a kitchen sink example to pull from. Reading order, headings, links, semantic lists, screen-reader-only text are a few things I know I'm already worried about. PDFs created by the existing tutorials are not tagged at all. If I have a pdf open in Acrobat and turn on NVDA, I get a warning message from Acrobat that the generated document is not tagged. My organization is WCAG 2.1/AA compliant. I can't use this in production till I can guarantee what it generates is accessible.