bobv/latex-bundle
Symfony bundle that generates .tex files with object-oriented PHP, compiles them to PDF, returns PDF HTTP responses, and caches results to avoid unnecessary regeneration.
.tex and compile it to PDF with LaTeX-level typography — real math, footnotes, multi-column layouts, cross-references, bibliographies. It supports decisions like "can we ship a technical report generator / invoice / certificate / academic-style export without a document-rendering SaaS?"pdflatex, bibtex) and template expertise. A PM decision it informs: is our document complexity high enough to justify an external LaTeX toolchain, or is HTML→PDF good enough for 90% of our needs?pdflatex ourselves.Consider it when:
.tex/Twig templates and debug compile errors.Look elsewhere when:
barryvdh/laravel-dompdf, Browsershot/Puppeteer, or a hosted API. Adapting this bundle means a service provider, a Twig bridge (Blade does not speak Twig), and replacing Symfony's cache and Process wiring — that's an internal fork you now own.\write18/shell-escape must stay off. If your threat model can't accommodate that, stop here.To executives (one paragraph): "We have a recurring need to produce high-quality PDFs — reports, invoices, certificates, compliance documents. Today that means either a paid document API or a basic HTML-to-PDF library that breaks on anything sophisticated. This is a small open-source (MIT, no licence cost) LaTeX-based generator that gives us print-grade output and full ownership of templates and data. The trade-off is engineering investment: LaTeX templates, plus a LaTeX runtime on our servers. Recommendation: treat it as a targeted capability for document-heavy features, not a platform-wide PDF standard — pilot on one high-value document type, measure template effort and compile latency, then decide whether to standardise or revert to a managed service."
To engineering (the honest version):
pdflatex ourselves. (a) is the lowest-risk path and keeps the Symfony coupling out of our app..tex builder, the Twig escaping/transliteration extensions (the parts that stop user data from breaking or injecting LaTeX), the cache-key approach, and the Process-based compile-with-error-parsing flow.How can I help you explore Laravel packages today?