Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # specifically use wktopdf12. Tested with version:
- # wkhtmltopdf 0.12.1-c22928d (with patched qt)
- try:
- if useStylesheet:
- print '\tUsing custom stylesheet for PDF creation.'
- uss = 'file:///venvs/document_processing/python/wkhtmltopdf_cache/report.css'
- subp = Popen(['wkhtmltopdf12', '-q', '--disable-internal-links', '--no-outline',
- '--user-style-sheet', uss, fullpath, tmppath])
- else:
- subp = Popen(['wkhtmltopdf12', '-q', '--disable-internal-links', '--no-outline', fullpath, tmppath])
- subp.wait()
- fileCreated = True
- except Exception as e:
- print >>sys.stderr, "wkhtmltopdf12 execution failed:", e
- msg = 'Failed to call wkhtmltopdf12. processing: %s' % fullpath
- print >>sys.stderr, ms
Advertisement
Add Comment
Please, Sign In to add comment