src/reportlab/platypus/doctemplate.py
changeset 4184 4e8fc7fc7092
parent 4183 66b0c5b63b07
child 4211 464df39467fc
--- a/src/reportlab/platypus/doctemplate.py	Wed Apr 15 14:43:00 2015 +0100
+++ b/src/reportlab/platypus/doctemplate.py	Thu Apr 16 14:52:55 2015 +0100
@@ -36,6 +36,7 @@
 import reportlab.lib.sequencer
 from reportlab.pdfgen import canvas
 from reportlab.lib.utils import isSeq, encode_label, decode_label, annotateException, strTypes
+
 try:
     set
 except NameError:
@@ -451,6 +452,7 @@
                     'cropMarks': None,
                     'enforceColorSpace': None,
                     'displayDocTitle': None,
+                    'lang': None,
                     }
     _invalidInitArgs = ()
     _firstPageTemplateIndex = 0
@@ -867,6 +869,8 @@
         self.canv.setKeywords(self.keywords)
         if self.displayDocTitle is not None:
             self.canv.setViewerPreference('DisplayDocTitle',['false','true'][self.displayDocTitle])
+        if self.lang:
+            self.canv.setCatalogEntry('Lang',self.lang)
 
         if self._onPage:
             self.canv.setPageCallBack(self._onPage)