1. Go to this page and download the library: Download azlanali076/litepdf 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/ */
azlanali076 / litepdf example snippets
use Azlanali076\Litepdf\Facades\Litepdf;
use Azlanali076\Litepdf\Models\LitepdfConversion;
// Using Uploaded File
$litepdfConversion = new LitepdfConversion($request->file('doc_key'));
// Using Image Link
$litepdfConversion = new LitepdfConversion(null,'https://link-to-doc');
// Convert the document
$response = Litepdf::convert($litepdfConversion);
// Get Converted Doc URL
echo $response->getFile();
use Azlanali076\Litepdf\Facades\Litepdf;
use Azlanali076\Litepdf\Models\LitepdfConversion;
$taskId = 'your_task_id_here';
// Check Progress
$response = Litepdf::checkProgress($taskId);
// Get Progress
echo $response->getProgress();