1. Go to this page and download the library: Download pdf-api-io/pdfapi-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/ */
pdf-api-io / pdfapi-laravel example snippets
return [
'api_key' => env('PDF_API_KEY'),
];
use Pdfapiio\PdfapiLaravel\Facades\PdfApi;
$templates = PdfApi::getTemplates();
use Pdfapiio\PdfapiLaravel\Facades\PdfApi;
PdfApi::output(ApiOutputType::PDF)->render('your-template', []); // Returns the PDF as a string
PdfApi::output(ApiOutputType::URL)->render('your-template', []); // Returns the URL to the rendered PDF