问题
I am using TCPDF for generating pdf. I am able to set margin for left,top and right using SetMargins($left, $top, $right = -1, $keepmargins = false)
but not able to set margin for the bottom of the pdf page.
Can any one help me to set bottom margin in TCPDF? Any help is appreciated.
回答1:
change the values of PDF_MARGIN_FOOTER, PDF_MARGIN_BOTTOM in the following code (taken from TCPDF examples):
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
来源:https://stackoverflow.com/questions/45027747/how-to-set-bottom-margin-in-tcpdf