Guest User

Untitled

a guest
May 22nd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. from weasyprint import HTML, CSS
  2. from weasyprint.fonts import FontConfiguration
  3.  
  4. font_config = FontConfiguration()
  5. html = HTML(string='<h1>Title here 自家製フォント工房</h1>')
  6. css = CSS(string='''''', font_config=font_config)
  7.  
  8. html.write_pdf(
  9. 'report.pdf', stylesheets=[css],
  10. font_config=font_config)
Add Comment
Please, Sign In to add comment