1. Go to this page and download the library: Download siturra/tcpdf-laravel 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/ */
use PDF; // at the top of the file
PDF::SetTitle('Hello World');
PDF::AddPage();
PDF::Write(0, 'Hello World');
PDF::Output('hello_world.pdf');
use PDF; // at the top of the file
for ($i = 0; $i < 5; $i++) {
PDF::SetTitle('Hello World'.$i);
PDF::AddPage();
PDF::Write(0, 'Hello World'.$i);
PDF::Output(public_path('hello_world' . $i . '.pdf'), 'F');
PDF::reset();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.