Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the parameter of the Image() in tcpdf?

Tags:

php

tcpdf

I need to align an image . But I did not get with the parameters passed inside the Image function in tcpdf .

$pdf->Image(Image_Path, 0, 250, 210 , 0, 'PNG', '', '', false, 300, '', false, false, 0, 'LB', false, false);

like image 353
Raju Avatar asked Dec 03 '22 22:12

Raju


1 Answers

Image( filename, left, top, width, height, type, link, align, resize, dpi, align, ismask, imgmask, border, fitbox, hidden, fitonpage)

filename : name of the file containing the image
left : from left
top: from top
width: width of the image. Zero for automatically calculated
height : height of the image. Zero for automatically calculated.
type: JPG, JPEG, PNG. If not specified, the type is inferred from the file extension.
link:URL or identifier returned by AddLink()
align: T (top), M (middle), B (bottom), N (next line)
resize: true/false. If true resize (reduce) the image to fit :w and :h (requires RMagick library); if false do not resize; if 2 force resize in all cases (upscaling and downscaling).
dpi: dot-per-inch resolution used on resize. Recommended 300
align: align L (left), C (center), R (right)
ismask: true if this image is a mask, false otherwise
imgmask: image object returned by this function or false.
border: 0: no border (default) 1: frame or a string containing some or all of the following characters (in any order): L: left T: top R: right B: bottom
fitbox: If true scale image dimensions proportionally to fit within the (:w, :h) box.
hidden: true/false
fitonpage: if true the image is resized to not exceed page dimensions.

From https://www.rubydoc.info/gems/rfpdf/1.17.1/TCPDF:Image

like image 106
Zeke Avatar answered Dec 11 '22 16:12

Zeke