Title property is missing in result PDF
mgm-rwagner opened this issue · 5 comments
I tried the example from the wiki page (https://github.com/danfickle/openhtmltopdf/wiki/PDF-Accessibility-(PDF-UA,-WCAG,-Section-508)-Support) with the 1.0.8 release and the accessibility checker returns that the title is missing.
Maybe i do something wrong but with the 1.0.3 release it was working.
Is there something like a workaround? I need it in an project very soon.
Hi @mgm-rwagner , looks like the title XMP metadata is not set according to the checker:
I'll have a deeper look.
hi @mgm-rwagner , I did a small test, you need to set the "PdfAConformance".
In you builder:
builder.usePdfAConformance(PdfRendererBuilder.PdfAConformance.PDFA_3_U);
You get:
I'll update the documentation, as it was missing this line of code.
About the reason: you can see in https://github.com/danfickle/openhtmltopdf/blob/open-dev-v1/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxRenderer.java#L728
Without a PDF/A set, it will avoid the whole section where it set some part of the xmp metadata.
Thank you for the fast response. Now it works.
One should be able to create PDF/UA docs that are not also PDF/A compliant, I think. I'll have to do some research on what metadata is required in each of the following circumstances:
- PDF/UA
- PDF/A
- Both
This also shows the perils of not having automated testing as it was correct (I believe) for PDF/UA but not PDF/A before fix was applied for the latter.
BTW. Thanks @syjer for investigating.