danfickle/openhtmltopdf

Document Language not getting set

mattstjean opened this issue · 2 comments

I am having an issue where the document language isn't getting set. When I run the adobe acrobat pro dc accessibility full check, it catches 2 fails:

Primary language | Failed | Text language is specified
Title | Failed | Document title is showing in title bar

The thing that I'm trying to figure out is why language is not getting set. I am using fastMode, and PdfAConformance.PDFA_1_A. Let me know if you need some more info from me. I get the same 2 fails even when I create a PDF from your all-in-one.html test file.

<html lang="EN-US">
    <head>
        <title>Summary</title>
        <meta name="subject" content="Summary" />
        <meta name="author" content="Business" />
        <meta name="description" content="Request Summary"/>

Originally posted by @mattstjean in #326 (comment)

Sorry for the delay @mattstjean.

This should now be fixed at head. The PDF/A validator library we're using didn't pick these issues up. I'm not sure if this is an oversight or a disagreement on the standard.

Anyway, the fix was as simple as copying four lines of code from the PDF/UA code (the manual PDF accessibility checker does require these settings) to the PDF/A code.

Released RC20 with fix for this issue. Thanks again.