Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from weasyprint import HTML, CSS
- from weasyprint.fonts import FontConfiguration
- font_config = FontConfiguration()
- html = HTML(string='<h1>Title here 自家製フォント工房</h1>')
- css = CSS(string='''''', font_config=font_config)
- html.write_pdf(
- 'report.pdf', stylesheets=[css],
- font_config=font_config)
Add Comment
Please, Sign In to add comment