TCPDF::setPageFormat( $format,  $orientation = 'P' )

Change the format of the current page


Description Description

See also See also


Top ↑

Parameters Parameters

$format

(Required) (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() documentation or an array of two numbers (width, height) or an array containing the following measures and options:<ul> <li>['format'] = page format name (one of the above);</li> <li>['Rotate'] : The number of degrees by which the page shall be rotated clockwise when displayed or printed. The value shall be a multiple of 90.</li> <li>['PZ'] : The page's preferred zoom (magnification) factor.</li> <li>['MediaBox'] : the boundaries of the physical medium on which the page shall be displayed or printed:</li> <li>['MediaBox']['llx'] : lower-left x coordinate</li> <li>['MediaBox']['lly'] : lower-left y coordinate</li> <li>['MediaBox']['urx'] : upper-right x coordinate</li> <li>['MediaBox']['ury'] : upper-right y coordinate</li> <li>['CropBox'] : the visible region of default user space:</li> <li>['CropBox']['llx'] : lower-left x coordinate</li> <li>['CropBox']['lly'] : lower-left y coordinate</li> <li>['CropBox']['urx'] : upper-right x coordinate</li> <li>['CropBox']['ury'] : upper-right y coordinate</li> <li>['BleedBox'] : the region to which the contents of the page shall be clipped when output in a production environment:</li> <li>['BleedBox']['llx'] : lower-left x coordinate</li> <li>['BleedBox']['lly'] : lower-left y coordinate</li> <li>['BleedBox']['urx'] : upper-right x coordinate</li> <li>['BleedBox']['ury'] : upper-right y coordinate</li> <li>['TrimBox'] : the intended dimensions of the finished page after trimming:</li> <li>['TrimBox']['llx'] : lower-left x coordinate</li> <li>['TrimBox']['lly'] : lower-left y coordinate</li> <li>['TrimBox']['urx'] : upper-right x coordinate</li> <li>['TrimBox']['ury'] : upper-right y coordinate</li> <li>['ArtBox'] : the extent of the page's meaningful content:</li> <li>['ArtBox']['llx'] : lower-left x coordinate</li> <li>['ArtBox']['lly'] : lower-left y coordinate</li> <li>['ArtBox']['urx'] : upper-right x coordinate</li> <li>['ArtBox']['ury'] : upper-right y coordinate</li> <li>['BoxColorInfo'] :specify the colours and other visual characteristics that should be used in displaying guidelines on the screen for each of the possible page boundaries other than the MediaBox:</li> <li>['BoxColorInfo'][BOXTYPE]['C'] : an array of three numbers in the range 0-255, representing the components in the DeviceRGB colour space.</li> <li>['BoxColorInfo'][BOXTYPE]['W'] : the guideline width in default user units</li> <li>['BoxColorInfo'][BOXTYPE]['S'] : the guideline style: S = Solid; D = Dashed</li> <li>['BoxColorInfo'][BOXTYPE]['D'] : dash array defining a pattern of dashes and gaps to be used in drawing dashed guidelines</li> <li>['trans'] : the style and duration of the visual transition to use when moving from another page to the given page during a presentation</li> <li>['trans']['Dur'] : The page's display duration (also called its advance timing): the maximum length of time, in seconds, that the page shall be displayed during presentations before the viewer application shall automatically advance to the next page.</li> <li>['trans']['S'] : transition style : Split, Blinds, Box, Wipe, Dissolve, Glitter, R, Fly, Push, Cover, Uncover, Fade</li> <li>['trans']['D'] : The duration of the transition effect, in seconds.</li> <li>['trans']['Dm'] : (Split and Blinds transition styles only) The dimension in which the specified transition effect shall occur: H = Horizontal, V = Vertical. Default value: H.</li> <li>['trans']['M'] : (Split, Box and Fly transition styles only) The direction of motion for the specified transition effect: I = Inward from the edges of the page, O = Outward from the center of the pageDefault value: I.</li> <li>['trans']['Di'] : (Wipe, Glitter, Fly, Cover, Uncover and Push transition styles only) The direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. If the value is a number, it shall be one of: 0 = Left to right, 90 = Bottom to top (Wipe only), 180 = Right to left (Wipe only), 270 = Top to bottom, 315 = Top-left to bottom-right (Glitter only). If the value is a name, it shall be None, which is relevant only for the Fly transition when the value of SS is not 1.0. Default value: 0.</li> <li>['trans']['SS'] : (Fly transition style only) The starting or ending scale at which the changes shall be drawn. If M specifies an inward transition, the scale of the changes drawn shall progress from SS to 1.0 over the course of the transition. If M specifies an outward transition, the scale of the changes drawn shall progress from 1.0 to SS over the course of the transition. Default: 1.0.</li> <li>['trans']['B'] : (Fly transition style only) If true, the area that shall be flown in is rectangular and opaque. Default: false.</li> </ul>

$orientation

(Optional) (string) page orientation. Possible values are (case insensitive):<ul> <li>P or Portrait (default)</li> <li>L or Landscape</li> <li>'' (empty string) for automatic orientation</li> </ul>

Default value: 'P'


Top ↑

Source Source

File: includes/lib/tcpdf/tcpdf.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.015 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.