mPDF Manual – mPDF functions

Thumbnail()

(mPDFI >= 2.3)

Thumbnail – Create thumbnails of an external PDF file and insert in current document

Description

void Thumbnail ( string $file [, integer $numberperrow [, float $spacing ]])

Create thumbnails of an external PDF file and insert in current document.

Parameters

$file

This parameter specifies the source PDF file to import.  $file should be a relative path to a local file.

$numberperrow

$number specifies the number of thumbnails to print in each row.

DEFAULT: 3

$spacing

$Specifies the spacing (vertical and horizontal) between thumbnails in millimetres.

DEFAULT: 10

Changelog

VersionDescription
2.3 Function was added.

Examples

Example #1

<?php

// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new mPDF();

$mpdf->SetImportUse();

$mpdf->Thumbnail('testfile.pdf', 4);

$mpdf->Output();

?>

See Also