diff options
Diffstat (limited to 'src/java/org/apache/fop/pdf/PDFRoot.java')
-rw-r--r-- | src/java/org/apache/fop/pdf/PDFRoot.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFRoot.java b/src/java/org/apache/fop/pdf/PDFRoot.java index 54cadf616..0dd9b890c 100644 --- a/src/java/org/apache/fop/pdf/PDFRoot.java +++ b/src/java/org/apache/fop/pdf/PDFRoot.java @@ -232,4 +232,24 @@ public class PDFRoot extends PDFDictionary { } } + /** + * Returns the language identifier of the document. + * @return the language identifier of the document (or null if not set or undefined) + * @since PDF 1.4 + */ + public String getLanguage() { + return (String)get("Lang"); + } + + /** + * Sets the language identifier of the document. + * @param lang the language identifier of the document. + */ + public void setLanguage(String lang) { + if (lang == null) { + throw new NullPointerException("lang must not be null"); + } + put("Lang", lang); + } + } |