Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laratex Laravel Package

ismaelw/laratex

Laratex is a Laravel package for generating PDFs with LaTeX. Write templates as Laravel views, compile them through a configurable LaTeX engine, and produce polished documents directly from your application.

View on GitHub
Deep Wiki
Context7

A Laravel package for creating PDF files using LaTeX

Frequently asked questions about Laratex
What is Laratex and when should I use it instead of HTML-to-PDF?
Laratex is a Laravel package that renders PDFs by compiling LaTeX templates through a configurable TeX engine, typically from Blade-style views. It is a good fit when you need high-fidelity typesetting for invoices, statements, reports, or labels and HTML-to-PDF fidelity is a recurring problem. Treat it as a peripheral rendering adapter behind an internal DocumentRenderer contract so you can swap it for DomPDF, wkhtmltopdf, or Gotenberg later. It is not a good fit for stateless or serverless runtimes that cannot execute a TeX binary.
How do I install ismaelw/laratex in a Laravel application?
Install it with Composer using composer require ismaelw/laratex, then optionally publish its configuration file if you need to change the LaTeX engine or paths. Integration effort in PHP is low: one facade or service call renders a template to a PDF. The larger cost is environmental, because every runtime that renders documents, including CI and queue workers, needs a TeX distribution installed. Verify the resolved package version with composer show before pinning it in production.
What are the server requirements for Laratex?
Laratex shells out to a LaTeX toolchain through Symfony Process, so the host must have a TeX distribution such as TeX Live with the fonts and packages your templates use. The runtime also needs a writable temporary directory and permission to execute external binaries. A minimal PHP install is not enough; the TeX image is often hundreds of megabytes to multiple gigabytes. Validate the toolchain at boot or in CI rather than discovering it on the first render failure.
Which Laravel and PHP versions does ismaelw/laratex support?
The upstream documentation does not clearly publish a complete Laravel, PHP, and Symfony Process compatibility matrix, so verify the exact resolved version in CI. The changelog references v1.3.1 as the release where older Laravel support is dropped, while v1.3.0-p1 appears intended for teams that cannot move to v1.3.1. Composer constraints like ^1.3 can resolve differently depending on normalization, so pin the exact tag you tested. Run composer show ismaelw/laratex and confirm the artifact before deploying.
How do I publish and customize the Laratex configuration file?
Laratex supports an optional config publish step, which lets you set the LaTeX engine and other rendering options without touching package code. Publish the config during project setup only if the defaults do not fit your environment, and commit it so local, CI, and production behave consistently. Keep engine-specific paths and flags in configuration rather than hard-coding them in business logic. If you wrap Laratex behind your own renderer interface, expose only the settings your application actually needs.
How do I create LaTeX PDF templates as Laravel views?
Write your document templates as Laravel views that produce LaTeX source, then pass the rendered source through Laratex to the configured TeX engine. Keep templates in your repository and treat them as product-owned assets rather than package internals. Use representative production data in a spike to confirm fonts, page breaks, and package dependencies compile correctly. Because the source is LaTeX, small template changes can affect layout, so include visual regression checks for customer-facing documents.
Is Laratex safe for user-supplied content, shell escape, and \input path traversal?
LaTeX compilation is a binary execution surface, so do not pass untrusted content directly into a .tex file. Ensure shell escape is disabled for your engine configuration, and escape or validate user-supplied values before they reach the template. Avoid dynamic \input paths built from request data, because path traversal and local file inclusion are real risks. If user content must influence the document, whitelist the allowed fields and render them as escaped text, not raw LaTeX commands.
Can Laratex run on serverless or read-only container filesystems?
No, Laratex is a poor fit for Lambda, Cloud Run, and similar stateless runtimes because it needs to execute a TeX binary and write temporary files. It also does not fit containers with read-only filesystems or environments that prohibit arbitrary binary execution. Use a VM or long-lived container image that includes TeX Live, writable temp storage, and the same toolchain on web and queue workers. If you must stay serverless, keep an HTML-to-PDF SaaS or a separate rendering service instead.
How does Laratex handle concurrency, temporary directories, and performance?
Each compilation should use its own working directory so parallel queue jobs do not collide; the package passes a temporary directory into Symfony Process, which helps but does not remove the need to test concurrency. Confirm temp-directory lifetime, cleanup, and permission behavior in your host application, especially after the 1.3.0-p1 patch. Measure render time for your largest real documents and account for TeX startup overhead in queue timeouts. Warm workers and a consistent TeX image reduce variance more than most PHP-level tuning.
Is ismaelw/laratex actively maintained, and what is the 1.3.0-p1 vs 1.3.1 versioning issue?
Laratex is a single-maintainer package with a low release cadence, so abandonment risk is real for a component on the critical path of invoice generation. The versioning is ambiguous: v1.3.0-p1 is published while the changelog references v1.3.1 as the release that drops older Laravel support. Pin the exact tag you validated, monitor upstream activity, and keep your renderer adapter thin so replacing Laratex is feasible. If long-term support matters, evaluate maintained alternatives or a managed rendering service before cutover.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console