Выполняю комманду:
xhtml2pdf --warn -d t.html tt.pdf
Converting t.html to /home/sasha/python/pdf/tt.pdf...
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_document.py line 117: pisaDocument options:
src = <open file '/home/sasha/python/pdf/t.html', mode 'rb' at 0xb7dbf9b0>
dest = <open file '/home/sasha/python/pdf/tt.pdf', mode 'wb' at 0xb7d21260>
path = '/home/sasha/python/pdf/t.html'
link_callback = None
xhtml = False
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 473: FileObject 'b.jpg', Basepath: '/home/sasha/python/pdf'
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 489: URLParts: ('', '', '/home/sasha/python/pdf', '', '', '')
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 473: FileObject 'arial.ttf', Basepath: '/home/sasha/python/pdf'
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 489: URLParts: ('', '', '/home/sasha/python/pdf', '', '', '')
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_context.py line 966: Load font '/home/sasha/python/pdf/arial.ttf'
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 473: FileObject 'arial.ttf', Basepath: '/home/sasha/python/pdf'
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 489: URLParts: ('', '', '/home/sasha/python/pdf', '', '', '')
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_context.py line 966: Load font '/home/sasha/python/pdf/arial.ttf'
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 473: FileObject 'arial.ttf', Basepath: '/home/sasha/python/pdf'
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_util.py line 489: URLParts: ('', '', '/home/sasha/python/pdf', '', '', '')
DEBUG [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_context.py line 966: Load font '/home/sasha/python/pdf/arial.ttf'
WARNING [ho.pisa] /usr/lib/python2.5/site-packages/pisa-3.0.33-py2.5.egg/sx/pisa3/pisa_document.py line 209: pyPDF not installed!
u'<pdfpagenumber> </pdfpagenumber>'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style>
@page {
margin: 1cm;
margin-bottom: 2.5cm;
@frame footer {
-pdf-frame-content: footerContent;
bottom: 2cm;
margin-left: 1cm;
margin-right: 1cm;
height: 1cm;
}
background-image: url(b.jpg);
}
/* Normal */
@font-face {
font-family: Arial;
src: url(arial.ttf);
}
@font-face {
font-family: Arial;
src: url(arial.ttf);
font-weight: bold;
}
@font-face {
font-family: Arial;
src: url(arial.ttf);
font-style: italic;
}
</style>
<body>
<h1>Русский</h1>
<table border="1">
<tr>
<td>12323</td><td>12323</td><td>12323</td>
</tr>
</table>
<div id="footerContent">
This is a footer on page #<pdf:pagenumber>
</div>
</body>
</html>
Тоже самое происходит и если вызывать генерацию из питон скрипта. ПРобовал ставить кодировку в документе utf-8(соответствует кодировке файла) - не помогает.