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);
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);
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.
The documentation is a good start:
Image( $file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = array() )
What do you mean by "align"?
Image( $file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = 'C', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = array() )
Put C for center align, L for Left align, R for right align
$tcpdf->Image('../xyz.png', $x=150, $y=10, $w=40, $h=20, 'PNG');
© 2022 - 2024 — McMap. All rights reserved.