PHP pdf

Basic Example https://drive.google.com/open?id=14v6MlZ5zk0gRuFRcXNJhIjnzvIvkf8Tk
1. Setup:
// Include autoloader require_once 'dompdf/autoload.inc.php'; 
 // Reference the Dompdf namespace use Dompdf\Dompdf; 
 // Instantiate and use the dompdf class $dompdf = new Dompdf();
2. Basic Usage (Convert HTML to PDF)
// Load HTML content $dompdf->loadHtml('<h1>Welcome to CodexWorld.com</h1>'); 
 // (Optional) Setup the paper size and orientation $dompdf->setPaper('A4''landscape'); 
 // Render the HTML as PDF $dompdf->render(); 
 // Output the generated PDF to Browser $dompdf->stream();
3. Advanced Usage
// Load content from html file $html file_get_contents("pdf-content.html"); $dompdf->loadHtml($html); 
 // (Optional) Setup the paper size and orientation $dompdf->setPaper('A4''landscape'); 
 // Render the HTML as PDF $dompdf->render(); 
 // Output the generated PDF (1 = download and 0 = preview) $dompdf->stream("codexworld", array("Attachment" => 0));
Source: https://www.codexworld.com/convert-html-to-pdf-php-dompdf/
Tips:
1. Set height for each input, select etc form fields
2. Set <br/> tag after each inline element like <lable> ...

Labels: ,

© copyright-2020 Rejaul