dhanya
dhanya

Reputation: 11

Resize background image same as page width and height in tcpdf with wordpress

I am trying to create a pdf with background image . It is not resizing up to page width and height.This is the code i used.

$pdf->setImageScale(1.53);
$pdf->AddPage();
$width = $pdf->getPageWidth();
$height = $pdf->getPageHeight();
$pdf->Image($img_file, 0, 0, $width, $height, '', '', '', false, 300, '', false, false, 0);

Does anyone have any ideas?

Upvotes: 0

Views: 1751

Answers (1)

exiang
exiang

Reputation: 559

Use the following option:

$pdf->SetAutoPageBreak(false, 0);

Upvotes: 2

Related Questions