Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 551 Bytes

File metadata and controls

23 lines (15 loc) · 551 Bytes

WeasyPrint + Flask PDF prototype (Docker)

This small prototype shows how to generate a PDF from an HTML template using WeasyPrint inside a Docker container.

How to run (macOS):

  1. Build image:
docker compose build
  1. Start container:
docker compose up
  1. Open http://localhost:5001/report to download the PDF.

Troubleshooting:

  • If WeasyPrint fails with missing libraries, ensure the Dockerfile installs the system packages for cairo/pango/gdk.
  • To change content, edit templates/report.html and refresh the page.