1

I customized my pdf invoice. I use graphics for header (logo and company address) and footer (company bank account information, contacts etc.). So my layout on the pdf looks something like this: enter image description here

As you can hopefully see. The text is cut where the red arrow points. Only if the amount of ordered products is high enough to force the pdf to create a second page, the invoice is correct.

Where exactly does the pdf manage the creation of new pages. Is there a possibility to define the maximum page height, so that in this case, all contents that would collide with the top border of the footer graphic, would force a next page?

2

Here is a guide for that. You should check the Zend_Pdf_Page class.

  • I managed to achieve what I wanted. In the Abstract.php there are two entries like this if ($this->y - $lineSpacing < 15) { $page = $this->newPage($pageSettings); } The higher the value, the sooner the new page gets created. – user3432078 Jul 31 '14 at 9:28
  • 1
    Link is broken :( – Luke Cousins Oct 26 '17 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.