<jupyter_start><jupyter_text>[weasyprint](https://github.com/Kozea/WeasyPrint)<jupyter_code>#!conda install -c conda-forge -y weasyprint<jupyter_output><empty_output><jupyter_text>Command-Line<jupyter_code>!weasyprint http://weasyprint.org weasyprint-website.pdf
!weasyprint http://weasyprint.org weasyprint-website.pdf \
    -s <(echo 'body { font-family: serif !important }')<jupyter_output><empty_output><jupyter_text>Python Library  Quickstart<jupyter_code>from weasyprint import HTML
HTML('http://weasyprint.org/').write_pdf('weasyprint-website.pdf')
from weasyprint import HTML, CSS
HTML('http://weasyprint.org/').write_pdf('weasyprint-website.pdf',
    stylesheets=[CSS(string='body { font-family: serif !important }')])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15191545574636725, 'fraction_numerical': 0.0, 'mean_word_length': 8.023809523809524, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '494174', 'license': 'MIT', 'n_tokens_mistral': 284, 'n_tokens_neox': 273, 'n_words': 35, 'path': 'weasyprint.ipynb', 'repo_name': 'alitrack/pdftk', 'size': '757'}