You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OUT = "output.pdf"
IN = "input.html"
from xhtml2pdf import pisa
with open(IN, 'r', encoding='utf-8') as html_file:
html_content = html_file.read()
with open(OUT, 'wb') as pdf_file:
pisa_status = pisa.CreatePDF(html_content, dest=pdf_file, encoding='utf-8')
if pisa_status.err:
return False
Expected Behavior
+ěščřžýáíéí
Actual Behavior
+■š■■žýáíéí
System Information
OS version: Windows 11 24H2
Python version: 3.13.0, also on 3.10.7
XHTML2PDF version: 0.2.16
The text was updated successfully, but these errors were encountered:
Describe the Bug
Slavic characters are replaced by ■. Standard Arial font knows this letters, where should be an error?
pdf is created with unreadable chars. I also tried updated this html (with file "arial.ttf" in the same directory), but there is the same ouptut:
Minimal Example to Reproduce
file input.html :
python code (utf-8 enconding too):
Expected Behavior
+ěščřžýáíéí
Actual Behavior
+■š■■žýáíéí
System Information
OS version: Windows 11 24H2
Python version: 3.13.0, also on 3.10.7
XHTML2PDF version: 0.2.16
The text was updated successfully, but these errors were encountered: