Switch PDF generation from Typst to WeasyPrint to match typst-templates layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-18 14:48:29 +03:30
parent 6159e46da8
commit e3980c5777
10 changed files with 725 additions and 58 deletions

View File

@@ -1,35 +1,20 @@
project:
type: default
output-dir: _output
post-render:
- scripts/html-to-pdf.py
format:
html:
lang: fa
dir: rtl
theme: none
css: styles/report.css
css:
- styles/report.css
- styles/print.css
embed-resources: true
toc: false
filters:
# print-chrome must run before html-no-extra-meta (needs author names)
- filters/print-chrome.lua
- filters/html-no-extra-meta.lua
typst:
lang: fa
mainfont: IRNazanin
fontsize: 13pt
papersize: a4
margin:
left: 2cm
right: 2cm
top: 2.5cm
bottom: 2.5cm
page-numbering: "۱"
font-paths:
- assets/fonts
template-partials:
- templates/typst/typst-template.typ
- templates/typst/typst-show.typ
- templates/typst/page.typ
filters:
- filters/ltr-spans.lua
- filters/typst-linebreaks.lua
- filters/summary-box.lua