php - Proper way to break pages -


My PHP script generates variable size text (restart) in HTML and breaks pages using CSS or PHP I need to break several A4 size pages if content is longer than 1 page. The problem is, I can not understand the solution because even if I count the contents of the material then it is not possible to calculate the height with padding margin etc.

Any suggestions?

Provides some features for CSS (i.e. printing).

Specifically, you might want to look at page-break-post , of course, it definitely depends on your page, but a general use can look like this:

  .page {Page-break-post: always; } .page.last {page-break-after: Avoid; }   

This will always pause one page after every .page except when it has .last class ( Otherwise you should be more corrective in such a way that you

Or, You can use the control:

  .section {page-break-inside: avoid;}   

This will avoid breaking into a section .

You can use @page to set the margin for each page:

  @page {margin: 1cm;} < / Code>  

Meditation Keep in mind that it's a matter of browser settings, you can set margins, print headers, etc., which affect all the results. The result can be different from the machine, there is no way to set these settings in the machine document.

Resume with me is an HTML document, and I recommend distributing it as a PDF (using a PDF printer), as a webpage. No, Programming is very error for work (you want it to be true 100% , 95% of the time).

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -