M
M
melervand2013-05-24 09:40:16
PHP
melervand, 2013-05-24 09:40:16

mpdf and bid-12?

The other day there was a need to display an invoice on the site.
First I solved the problem with simple HTML and @media print. But some browsers, namely Chrome and Safari, did not correctly handle page-break-*table rows.
Then I decided to drive everything into PDF. Then mpdf turned up.
But there is one problem - everyone who is in the subject knows that in the form of bidding-12, if the last block with information about the manager and shipment does not fit on the page, then it moves to the next with the last line from the table with goods.
So, as I did not suffer, I could not add page-break-before: auto;the last line of the table and information to the group.
So far, as a head-on solution, the last line and the information block are always carried over to the next page.
Who can faced it? How did you decide?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
sameoldmadness, 2013-05-25
@sameoldmadness

Personally, I never managed to build this form according to the html template. (does mpdf take a template as input?)
A more flexible approach is to use tcpdf . You will have to calculate the remaining space on the page manually, but the document will be displayed as intended.

S
sameoldmadness, 2013-05-25
@sameoldmadness

But what about Cyrillic?

A couple of years ago it was not supported out of the box, you had to assemble the font yourself. The operation is quite trivial, after that there are no problems with the Cyrillic alphabet.

M
Mikhail Krivushin, 2013-08-07
@Deepwalker

I need! Basically, of course, html + css, so as not to repeat the work done many times over again.

C
chesslip, 2014-08-18
@chesslip

Has anyone managed to solve this problem? Using fPDF, I generate TORG-12, and "transferring the last line of the table" is the only cant, so far without a hint of a solution.

F
froch, 2016-08-13
@froch

I've been trying for a few days now with no results. Does anyone have a solution?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question