Skip to content

Instantly share code, notes, and snippets.

View vladimir-poleh's full-sized avatar

Vladimir Poleh vladimir-poleh

View GitHub Profile
@pikhovkin
pikhovkin / weasyprint_complex_headers.py
Last active June 16, 2024 15:17
Repeat on each page of complex headers (eg, tables) except the first page
# coding: utf-8
from weasyprint import HTML, CSS
def get_page_body(boxes):
for box in boxes:
if box.element_tag == 'body':
return box