diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-04-17 13:07:29 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-04-17 13:07:29 +0000 |
commit | 218fa1d72a0f14273d8621047687da7f0ab2b49e (patch) | |
tree | e323fc6458f465e865280cf06d1ee2e5f9107bba /src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java | |
parent | 8eefdf7d68cc640ca4c3d4ac331e5af1a9049ee0 (diff) | |
download | xmlgraphics-fop-218fa1d72a0f14273d8621047687da7f0ab2b49e.tar.gz xmlgraphics-fop-218fa1d72a0f14273d8621047687da7f0ab2b49e.zip |
Enabled support for PDF/A-1a now that we have Tagged PDF, Natural Language Specification and alternate descriptions (fox:alt-text).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@765979 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java b/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java index aba4cceb3..285542635 100644 --- a/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java @@ -306,8 +306,15 @@ public class PDFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler { if (getUserAgent().isAccessibilityEnabled()) { try { if (this.pdfDoc.getRoot().getLanguage() == null) { - //No language has been set on the first page-sequence, so fall back to "en". - this.pdfDoc.getRoot().setLanguage("en"); + String fallbackLanguage; + if (this.pdfDoc.getProfile().getPDFAMode().isPDFA1LevelA()) { + //According to Annex B of ISO-19005-1:2005(E), section B.2 + fallbackLanguage = "x-unknown"; + } else { + //No language has been set on the first page-sequence, so fall back to "en". + fallbackLanguage = "en"; + } + this.pdfDoc.getRoot().setLanguage(fallbackLanguage); } if (reducedFOTree == null) { |