We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Generate tagged PDF using Aspose.PDF - Setting the Natural Language for document

Using Pdf DocumentInfo

How do I set the /Lang element for a pdf document in line with the pdf accessibility requirements detailed here: https://www.w3.org/TR/WCAG20-TECHS/PDF16.html

I have tried DocumentInfo.Add("/Lang", “en-US”)

And while this adds a custom property called /Lang it doesn’t get set as the natural language for the document.

Please can you advise what I need to do?

Thank you.

@modern.gov

It seems like your requirements are related to generate Tagged PDF (508 compliant PDF). In case our assumption are correct, you may set language and title of a Accessible PDF by following the code snippet given in article. In case your requirements are different, please share a bit more details with us. We will further proceed to assist you accordingly.

Hello,

I have followed the instructions in that article and while that does set the language for the TaggedContent it does not seem to set the language for the document, which means the document still reports as not having a language (see attached picture).

image.png (7.7 KB)

Please can you advise how I can set the document’s /LANG flag (which I understand is what Abobe is checking here).

Thanks,

Stan

@modern.gov

Would you please share your sample PDF document along with the complete code that you have tried so far. We will test the scenario in our environment and address it accordingly.