Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title property is missing in result PDF #707

Closed
mgm-rwagner opened this issue May 26, 2021 · 5 comments
Closed

Title property is missing in result PDF #707

mgm-rwagner opened this issue May 26, 2021 · 5 comments

Comments

@mgm-rwagner
Copy link

mgm-rwagner commented May 26, 2021

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.

grafik

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.

@syjer
Copy link
Contributor

syjer commented May 26, 2021

Hi @mgm-rwagner , looks like the title XMP metadata is not set according to the checker:

detail

I'll have a deeper look.

@syjer
Copy link
Contributor

syjer commented May 26, 2021

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:

ok

I'll update the documentation, as it was missing this line of code.

@syjer
Copy link
Contributor

syjer commented May 26, 2021

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.

@mgm-rwagner
Copy link
Author

Thank you for the fast response. Now it works.

@danfickle
Copy link
Owner

danfickle commented May 27, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants