Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pydf
- pdf = pydf.generate_pdf('<h1>this is html</h1>')
- with open('test_doc.pdf', 'wb') as f:
- f.write(pdf)
- (pdf) <computer>:<folder> <user>$ python pdf.py
- Traceback (most recent call last):
- File "pdf.py", line 3, in <module>
- pdf = pydf.generate_pdf('<h1>this is html</h1>')
- File "/Users/nilesbrandon/Projects/pdf/pdf/lib/python2.7/site-packages/pydf/wkhtmltopdf.py", line 121, in generate_pdf
- return gen_pdf(html_file.name, cmd_args)
- File "/Users/nilesbrandon/Projects/pdf/pdf/lib/python2.7/site-packages/pydf/wkhtmltopdf.py", line 105, in gen_pdf
- _, stderr, returncode = execute_wk(*cmd_args)
- File "/Users/nilesbrandon/Projects/pdf/pdf/lib/python2.7/site-packages/pydf/wkhtmltopdf.py", line 22, in execute_wk
- p = subprocess.Popen(wk_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
- errread, errwrite)
- File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
- raise child_exception
- python-pdf==0.30
Add Comment
Please, Sign In to add comment