'How to add margin on every page break in TCPDF
Solution 1:[1]
To add margin to the page
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
Example
$pdf->SetMargins(10, 20, 10);
Solution 2:[2]
set margins
SetTopMargin(), SetRightMargin(), SetAutoPageBreak(), SetMargins()
margin all sides of page The last value if true overwrites the default page margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT,true);
(minimum distance between header and top page margin)
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER/[int $hm = 10 ]);
(minimum distance between footer and bottom page margin)
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER/[int $hm = 10 ]);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Muhammad Habib |
Solution 2 | matin |