mPDF

You find the manual of mPDF here: https://mpdf.github.io/

RockPdf can do everything that mPDF can do. For the most common tasks we have helpers that make working with mPDF a lot more convenient. If anything is missing you can always access the mPDF instance and work directly with mPDF:

/** @var RockPdf $pdf */
$pdf = $modules->get('RockPdf');
$doc = $pdf->load("/site/test.php");

$mpdf = $doc->mpdf();
$mpdf->shrink_tables_to_fit = 0;
$mpdf->WriteHTML('Some Text');

$doc->save(preview: true);

Alternatively you can use the callback syntax:

/** @var RockPdf $pdf */
$pdf = $modules->get('RockPdf');
$pdf
  ->load("/site/test.php")
  ->invoke(function ($mpdf) {
    $mpdf->shrink_tables_to_fit = 0;
    $mpdf->WriteHTML('Some Text');
  })
  ->save(preview: true);
RockPdf - mPDF

Or you can change the settings to be used when mPDF is loaded:

/** @var RockPdf $pdf */
$pdf = $modules->get('RockPdf');
$pdf
  ->settings([
    'mode' => 'utf-8',
    'format' => 'A4-L',
  ])
  ->load("/site/test.php")
  ->save(preview: true);