Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with tcpdf Pagebreak
    primarykey
    data
    text
    <p>I have a little problem with a pagebreak. The Multicell is displayed over the footer of the first page and then it breaks: How can I set the bottom margin of the page so that the break happened earlier above? Here is the example PDF: <a href="http://www.ecerts.de/tcpdf.pdf" rel="nofollow noreferrer">Example</a> and here the sourcecode: </p> <pre><code>&lt;?php require_once('../tcpdf/config/lang/eng.php'); require_once('../tcpdf//tcpdf.php'); class MYPDF extends TCPDF { public function Header() { $auto_page_break = $this-&gt;AutoPageBreak; $this-&gt;SetAutoPageBreak(false,0); $this-&gt;setJPEGQuality(100); $img_file = 'images/mandanten/ce_background.jpg'; $this-&gt;Image($img_file, $x=160, $y=72, $w=36, $h=200, $type='', $link='', $align='', $resize=true, $dpi=150, $palign='', $ismask=false, $imgmask=false, $border=0); $this-&gt;SetAutoPageBreak($auto_page_break); } } $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf-&gt;SetCreator(PDF_CREATOR); $pdf-&gt;SetAuthor('tmpAutor'); $pdf-&gt;SetTitle('tmpTitle'); $pdf-&gt;SetSubject('tmpSubject'); $pdf-&gt;SetKeywords('tmp'); $pdf-&gt;setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf-&gt;setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf-&gt;SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); $pdf-&gt;SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT); $pdf-&gt;SetHeaderMargin(PDF_MARGIN_HEADER); $pdf-&gt;SetFooterMargin(PDF_MARGIN_FOOTER); $pdf-&gt;SetAutoPageBreak(True, PDF_MARGIN_BOTTOM); //set image scale factor $pdf-&gt;setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf-&gt;setLanguageArray($l); $pdf-&gt;AddPage(); $pdf-&gt;SetFont('freesans', '', 16); $pdf-&gt;Cell(0, 10, 'Headline', 0, 1, 'L'); $pdf-&gt;SetFont('freesans', '', 11); // Some Dummy Unicode content $tmp = 'Lorèm ìpsum dolor sìt åmèt, čonsètètur sådìpsčìng èlìtr, sèd dìåm nonumy èìrmod tèmpor ìnvìdunt ut låborè èt dolorè mågnå ålìquyåm èråt, sèd dìåm voluptuå. åt vèro èos èt åččusåm èt justo duo dolorès èt èå rèbum. Stèt člìtå kåsd gubèrgrèn, no sèå tåkìmåtå sånčtus èst Lorèm ìpsum dolor sìt åmèt. Lorèm ìpsum dolor sìt åmèt, čonsètètur sådìpsčìng èlìtr, sèd dìåm nonumy èìrmod tèmpor ìnvìdunt ut låborè èt dolorè mågnå ålìquyåm èråt, sèd dìåm voluptuå. åt vèro èos èt åččusåm èt justo duo dolorès èt èå rèbum. Stèt člìtå kåsd gubèrgrèn, no sèå tåkìmåtå sånčtus èst Lorèm ìpsum dolor sìt åmèt.wåèdr'; $pdf-&gt;MultiCell(140, 0, $tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp."&lt;br&gt;&lt;br&gt;".$tmp, 0, 'J', 0, 0, '', '', true, 0,true); $pdf-&gt;Output('example_051.pdf', 'I'); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload