Skip to content

Instantly share code, notes, and snippets.

View jdeloshoyos's full-sized avatar
😅

Jaime de los Hoyos M. jdeloshoyos

😅
View GitHub Profile
@nathandem
nathandem / pdf.py
Last active February 7, 2022 08:23
Arbitrary header/footer integration in Weasyprint PDF pages
from weasyprint import HTML, CSS
class PdfGenerator:
"""
Generate a PDF out of a rendered template, with the possibility to integrate nicely
a header and a footer if provided.
Notes:
------