Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

something wrong happens when i make pdf from html #124

Closed
52lemon opened this issue Dec 17, 2018 · 1 comment
Closed

something wrong happens when i make pdf from html #124

52lemon opened this issue Dec 17, 2018 · 1 comment

Comments

@52lemon
Copy link

52lemon commented Dec 17, 2018

pdfkit.from_string(html, "static/张三丰的记账凭证FS10001.pdf", configuration=config)
error log
ERROR:E:\PycharmProjects\ChunJun\apps\v1_5\order\api.py:order_detail_handler in root Traceback (most recent call last): File "E:\PycharmProjects\ChunJun\apps\v1_5\order\api.py", line 246, in post_certificate pdfkit.from_string(html, file_name, configuration=config) File "C:\Python27\lib\site-packages\pdfkit\api.py", line 72, in from_string return r.to_pdf(output_path) File "C:\Python27\lib\site-packages\pdfkit\pdfkit.py", line 129, in to_pdf stderr=subprocess.PIPE) File "C:\Python27\lib\subprocess.py", line 394, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 599, in _execute_child args = list2cmdline(args) File "C:\Python27\lib\subprocess.py", line 294, in list2cmdline return ''.join(result) UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 0: unexpected end of data
this seems it does not well support chinese characters,how can i solve this problem, can u give me a hand

@JazzCore
Copy link
Owner

Should be fixed in master now, looks like a duplicate of #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants