MareArts Computer Vision Study.
Computer Vision & Machine Learning Research Laboratory
Pages
ðĄ
ð Contents table
ð MareArts ➚
ðŽ MareArts Live ➚
11/28/2021
print pdf from html, python code
#pip install weasyprint
from
weasyprint
import
HTML
#read html
HTML_path
=
'./sample.html'
#convert html2pdf with coordinate
pdf
=
HTML(
HTML_path
).write_pdf()
#save pdf
open
(
'sample_weasyprint.pdf'
,
'wb'
).write(pdf)
Thank you.
www.marearts.com
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment