Red Hat Bugzilla – Bug 820533
xhtml2pdf does not support languages other than Latin1
Last modified: 2016-07-19 06:05:35 EDT
Description of problem:
In pdf it produce only bold squares instead of any letter not in Latin1 (tested on Russian).
--encoding option does nothing.
Version-Release number of selected component (if applicable):
$ rpm -qf `which xhtml2pdf`
Do you have some snippet, to reproduce that? (My keyboard contains only latin characters...)
Created attachment 584300 [details]
File to reproduce problem
I've attach file to reproduce problem.
your attachment doesn't look very cyrillic for me.
OK, my terminal is utf-8, I got your attachment from bz.
I used my test-code:
from xhtml2pdf import pisa
filebase = 'test'
pdf = pisa.CreatePDF(handle.read(), file(filebase+'.pdf','wb'))
if __name__ == '__main__':
[mrunge@mrungexp ~]$ cat test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
English text<br />
Ð ÑƒÑÑÐºÐ¸Ð¹ Ñ‚ÐµÐºÑÑ‚
(produces the attached test.pdf)
Created attachment 584304 [details]
pdf produced from attachment?
The produced test.pdf looks for me exactly the same as the code from attachment https://bugzilla.redhat.com/attachment.cgi?id=584300 but also not as cyrillic as I' expect your contribution.
Created attachment 585023 [details]
Please look at screenshot as I seen it.
Ok, understood, finally, I can reproduce this; it looks like those font shapes don't exist to in that font rendering the PDF.
Let's wait and see what upstream answers.
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '17'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 17's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 17 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged change the
'version' to a later Fedora version prior to Fedora 17's end of life.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Just took over this package. Is the issue still present in version 0.0.6?
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.
(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)
More information and reason for this action is here:
Unfortunately I can't even test it now:
$ xhtml2pdf pdf.input
Reportlab Version 2.1+ is needed!
The following Python packages are required for PISA:
- Reportlab Toolkit >= 2.2 <http://www.reportlab.org/>
- HTML5lib >= 0.11.1 <http://code.google.com/p/html5lib/>
- pyPDF <http://pybrary.net/pyPdf/>
- PIL <http://www.pythonware.com/products/pil/>
No handlers could be found for logger "xhtml2pdf"
Traceback (most recent call last):
File "/bin/xhtml2pdf", line 9, in <module>
load_entry_point('xhtml2pdf==0.0.5', 'console_scripts', 'xhtml2pdf')()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/site-packages/xhtml2pdf/__init__.py", line 41, in <module>
from xhtml2pdf.util import REPORTLAB22
File "/usr/lib/python2.7/site-packages/xhtml2pdf/util.py", line 39, in <module>
raise ImportError("Reportlab Version 2.1+ is needed!")
ImportError: Reportlab Version 2.1+ is needed!
So problem actual.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.