Corpen generates downloadable PDF reports across more than a dozen modules — exequial service records, five-percent accounting statements, insurance claims, correspondence history, workflow audits, indicators dashboards, and more. All PDFs are produced by theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/corpentunida-org/corpen/llms.txt
Use this file to discover all available pages before exploring further.
barryvdh/laravel-dompdf ^2.2 package, which renders a Blade view to a PDF byte stream that is either downloaded directly to the user’s browser or stored on S3 before downloading.
Installed Package
Barryvdh\DomPDF\Facade\Pdf facade (aliased as Pdf) automatically via Laravel’s package discovery. The full configuration is published to config/dompdf.php.
Default DomPDF Configuration
Corpen ships with the following defaults inconfig/dompdf.php:
| Option | Value |
|---|---|
default_paper_size | a4 |
default_paper_orientation | portrait |
default_font | serif |
dpi | 96 |
pdf_backend | CPDF |
enable_remote | true (allows loading external images) |
enable_php | false |
font_dir / font_cache | storage/fonts/ |
| Custom font | Corinthia-Regular.ttf (signature rendering) |
How DomPDF Works in Corpen
Every PDF generation method follows the same three-line pattern:Pdf::loadView() renders the Blade template with the supplied data array, converting the resulting HTML to a PDF byte stream. ->download() sends a Content-Disposition: attachment response; ->stream() sends Content-Disposition: inline so the browser displays the PDF in a new tab.
For reports that must also be archived, the ->output() method returns the raw PDF bytes for storage:
PDF Endpoints
| Route | HTTP | Controller method | Description |
|---|---|---|---|
GET /exequial/asociados/{id}/generarpdf/{active} | GET | ComaeExCliController::generarpdf | Exequial client coverage sheet (portrait or landscape depending on $active) |
GET /exequial/prestarServicio/generarpdf | GET | MaeC_ExSerController::generarpdf | Full exequial monitoring report — all records, letter landscape |
GET /exequial/prestarServicio/{id}/generarpdf | GET | MaeC_ExSerController::reporteIndividual | Individual exequial service record, letter landscape |
GET /movcontables/{id}/reportepdf/ | GET | MoviContCincoController::generarpdf | Five-percent accounting movements per associate, letter landscape |
GET /condicionRetiros/{id}/reportepdf/ | GET | CondicionesRetirosController::generarpdf | Retirement liquidation sheet (currently renders as web view for review) |
GET /comunicaciones-salida/{id}/descargar-pdf | GET | ComunicacionSalidaController::descargarPdf | Outgoing correspondence letter with S3 signature image embedded as Base64 |
POST /indicators/generar/informe | POST | IndicadoresController::descargarInforme | Indicators dashboard report — saved to S3 and logged before download |
POST /seguros/reclamacion/generarpdf | POST | SegReclamacionesController::generarpdf | Insurance claim PDF |
Sample PDF Generation Methods
The examples below are taken directly from the Corpen source.Blade Views for PDFs
PDF templates live inresources/views/ using the same dot-notation as any other Blade view. The naming convention used across Corpen is to append pdf or pdf.blade.php to the view directory:
| Blade view path | Module |
|---|---|
exequial/prestarServicio/indexpdf.blade.php | Exequial monitoring |
exequial/asociados/showpdf.blade.php | Exequial client — portrait |
exequial/asociados/showpdf2.blade.php | Exequial client — landscape |
cinco/movcontables/reportepdf.blade.php | Five-percent accounting |
cinco/retiros/liquidacionpdf.blade.php | Retirement liquidation |
correspondencia/comunicaciones_salida/pdf.blade.php | Correspondence letter |
correspondencia/correspondencias/historial_pdf.blade.php | Correspondence history |
correspondencia/tablero/pdf.blade.php | Correspondence dashboard |
cartera/morosospdf.blade.php | Portfolio delinquency |
indicators/informepdf.blade.php | Indicators dashboard |
interactions/reportes/pdf.blade.php | Interaction audit |
inventario/activos/pdf.blade.php | Asset inventory |
inventario/compras/pdf.blade.php | Purchase invoice |
inventario/movimientos/pdf.blade.php | Inventory movement |
flujo/auditoria/pdf.blade.php | Workflow audit |
flujo/workflows/pdf.blade.php | Workflow report |
seguros/reclamaciones/pdf.blade.php | Insurance claims |
reserva/dashboard/pdf.blade.php | Reservation dashboard |
DomPDF renders HTML/CSS to PDF without a browser rendering engine, so only a subset of CSS is supported. All PDF Blade views in Corpen use inline CSS (
style="...") or <style> blocks inside the document — external stylesheets loaded via <link> are not reliably applied. Background images and signature images must be passed as Base64-encoded data URIs (see the descargarPdf correspondence example above).Custom Font: Corinthia
Theconfig/dompdf.php registers the Corinthia script font for signature rendering:
Corinthia-Regular.ttf in storage/fonts/ and the font will be available in any PDF Blade view via font-family: Corinthia;.
Generating PDFs from Artisan (Debugging)
To verify a PDF template renders correctly without hitting an HTTP route, call the controller directly from Tinker:/tmp/test.pdf locally to inspect layout before deploying.