1. Go to this page and download the library: Download fissible/transmark-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/ */
fissible / transmark-pdf example snippets
use Fissible\Transmark\Pdf\PdfWriter;
use Fissible\Transmark\Readers\DocxReader;
use Fissible\Transmark\Pdf\PdfReader;
$docxBytes = file_get_contents('agreement.docx');
$document = (new DocxReader())->read($docxBytes);
$pdfBytes = (new PdfWriter())->write($document);
$recovered = (new PdfReader())->read($pdfBytes);
file_put_contents('agreement.pdf', $pdfBytes);
use Dompdf\Options;
$options = new Options();
$options->set('defaultFont', 'Helvetica');
$pdfBytes = (new PdfWriter(options: $options))->write($document);
$writer = new PdfWriter(paperSize: 'A4', paperOrientation: 'landscape');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.