use ISO encoding for Word; use Section2 CSS class (landscape orientation) as standard for listings
This commit is contained in:
parent
cc8584f957
commit
bbc5f16454
2 changed files with 7 additions and 3 deletions
|
@ -30,7 +30,8 @@ word_template = ViewPageTemplateFile('word_page.pt')
|
|||
|
||||
class Base(BrowserPage):
|
||||
|
||||
encoding = 'UTF-8'
|
||||
#encoding = 'UTF-8'
|
||||
encoding = 'ISO8859-15'
|
||||
|
||||
def __call__(self, *args, **kw):
|
||||
data = self.index(*args, **kw).encode(self.encoding)
|
||||
|
@ -48,7 +49,8 @@ class WordDocument(Base):
|
|||
response = self.request.response
|
||||
response.setHeader('Cache-Control', '')
|
||||
response.setHeader('Pragma', '')
|
||||
response.setHeader('Content-Type', 'application/msword;charset=utf-8')
|
||||
response.setHeader('Content-Type',
|
||||
'application/msword;charset=%s' % self.encoding)
|
||||
response.setHeader('Content-Length', len(data))
|
||||
response.setHeader('Content-Disposition', 'filename="%s"' % fn)
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
</head>
|
||||
|
||||
<body class="doc">
|
||||
<metal:content use-macro="view/content" />
|
||||
<div class="Section2">
|
||||
<metal:content use-macro="view/content" />
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue