PHP code example of jengo / pdf
1. Go to this page and download the library: Download jengo/pdf library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jengo / pdf example snippets
use Jengo\Pdf\Pdf;
// 1. Fluent commercial invoice
return Pdf::invoice('INV-2026-001')
->client(['name' => 'Acme Corp', 'email' => '[email protected]'])
->addItem('Cloud Architecture Consulting', 1, 3500.00)
->tax(16.0)
->download('invoice-001.pdf');
// 2. Interactive in-browser preview canvas
return Pdf::invoice('INV-2026-001')->preview();
// 3. Render raw HTML or CI4 view
return Pdf::view('invoices/receipt', $data)->inline();