Manuals

 

Info

It's FREE!

The 'F' in FPDI stands for 'free': you may use it for any kind of project and adapt it to your needs -the license conditions of ASL 2.0 are met nevertheless.

donate via PayPal


FPDI::importPage()

Description

class FPDI extends FPDF_TPL {
mixed importPage ( integer $pageno[, string $boxName='/CropBox'] ) }

Transforms a source page to a FPDF_TPL template and returns the id of created "template" (or page in this case).

Parameters

$pageno

The page number to import.

$boxName

The box which should be used to display the imported page.

Possible values are:

  • /MediaBox
  • /BleedBox
  • /TrimBox
  • /CropBox
  • /ArtBox

If a box is not found, FPDI will look up for it's parent box and use this instead. You can check which box were imported with FPDI::getLastUsedPageBox().

Return Values

If the page was imported correctly the method will return the id of the template (page) to use with useTemplate(). If you define a wrong box in the 2nd parameter the method will return false.