TCPDF extends TCPDF
Custom version of the TCPDF library class, allowing for any required overrides.
Tags
Table of Contents
- $logger : Logger
- Trace logger.
- Image() : mixed
- Overrides the TCPDF::Image method to decrypt encrypted $file paths from the Image widget, then pass them to the normal TCPDF::Image along with all of the other (unmodified) parameters.
Properties
$logger
Trace logger.
private
static Logger
$logger
= null
Tags
Methods
Image()
Overrides the TCPDF::Image method to decrypt encrypted $file paths from the Image widget, then pass them to the normal TCPDF::Image along with all of the other (unmodified) parameters.
public
Image(string $file[, float $x = '' ][, float $y = '' ], float $w, float $h[, string $type = '' ][, mixed $link = '' ][, string $align = '' ][, bool $resize = false ][, int $dpi = 300 ][, string $palign = '' ][, bool $ismask = false ][, mixed $imgmask = false ], mixed $border[, mixed $fitbox = false ][, $hidden = false ][, $fitonpage = false ][, $alt = false ][, $altimgs = array() ]) : mixed
Parameters
- $file : string
-
Name of the file containing the image.
- $x : float = ''
-
Abscissa of the upper-left corner.
- $y : float = ''
-
Ordinate of the upper-left corner.
- $w : float
-
Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
- $h : float
-
Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
- $type : string = ''
-
Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension.
- $link : mixed = ''
-
URL or identifier returned by AddLink().
- $align : string = ''
-
Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:
- T: top-right for LTR or top-left for RTL
- M: middle-right for LTR or middle-left for RTL
- B: bottom-right for LTR or bottom-left for RTL
- N: next line
- $resize : bool = false
-
If true resize (reduce) the image to fit $w and $h (requires GD library).
- $dpi : int = 300
-
dot-per-inch resolution used on resize
- $palign : string = ''
-
Allows to center or align the image on the current line. Possible values are:
- L : left align
- C : center
- R : right align
- '' : empty string : left for LTR or right for RTL
- $ismask : bool = false
-
true if this image is a mask, false otherwise
- $imgmask : mixed = false
-
image object returned by this function or false
- $border : mixed
-
Indicates if borders must be drawn around the image. The value can be either a number:
- 0: no border (default)
- 1: frame
- L: left
- T: top
- R: right
- B: bottom
- $fitbox : mixed = false
- $hidden : = false
-
(boolean) If true do not display the image.
- $fitonpage : = false
-
(boolean) If true the image is resized to not exceed page dimensions.
- $alt : = false
-
(boolean) If true the image will be added as alternative and not directly printed (the ID of the image will be returned).
- $altimgs : = array()
-
(array) Array of alternate images IDs. Each alternative image must be an array with two values: an integer representing the image ID (the value returned by the Image method) and a boolean value to indicate if the image is the default for printing.