Thumbnail()
(mPDF ≥ 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.
Note: $file should be a relative path to a local file.
- $numberperrow
-
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
Version | Description |
---|---|
2.3 | Function was added. |
Examples
Example #1
<?php
// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf();
$mpdf->SetImportUse(); // only with mPDF <8.0
$mpdf->Thumbnail('testfile.pdf', 4);
$mpdf->Output();
See Also
- SetImportUse() - Enable the use of imported PDF files or templates
- SetSourceFile() - Specify the source PDF file used to import pages into the document
- ImportPage() - Import a page from an external PDF file
- UseTemplate() - Insert an imported page from an external PDF file
- SetPageTemplate() - Specify a page from an external PDF file to use as a template
- SetDocTemplate() - Specify an external PDF file to use as a template
- RestartDocTemplate() - Re-start the use of a Document template from the next page