Avoid Page Break (html2ps/pdf from tufat.com)
Posted by tufat on 26 Sep 2008 at 11:54 AM
$4.00
I tried some things with the PHP html2ps version, but I'm still not getting the hang out on how to avoid page breaking.
According to the html2ps documentation, there should be an option page-break-inside: avoid, which I guess avoids breaking the page inside the HTML element specified. Whatever, it doesn't work for me and I'd really need this feature.
In general, all I have is a DIV container or TABLE element, while I have very large content inside the DIV or TD element. So how can I avoid page breaking of this content and instead, scale the content to a size that fits into one single PDF page?
My CSS looks like this:
@html2ps {
break-table: 0; // which should be set by default anyways
}
div, table, tr, td {
page-break-inside: avoid;
}
I also tried specifing style="page-break-inside: avoid" directly in the HTML elements and many other suspicious ways, without any luck.
All I want html2ps to do is to always print a certain table on one single page. This table contains many cells with graphics and text and in the end, it displays a special structure. If the table size is bigger than the page, scale it.
Are there any other special configurations needed? Do I use it wrong? Please help me, thanks in advance.
also posted here:
http://forum.tufat.com/showthread.php?t=52045
Proposed Answers and Comments (oldest first)
In the event of multiple correct answers, you should accept the answer of the first user who provided a complete and valid answer to your question.
| Proposed answer by sohel.rentacoder on 01 Oct 2008 at 03:28 AM Page-break-inside only supports the opera web browser, that’s why you are facing the problem. |
| Proposed answer by admin on 25 Sep 2008 at 10:21 PM You can use the Nz function to return zero, a zero-length string (" "), or another specified value when a Variant is Null. Variant. |
Most Recent Questions
Most Recent Answers
Home Page
Login
Register
Information Technology
Software, Hardware, Design
Programming Languages- ASP and ASP.NET
- Assembly and Machine Lang
- C and C++
- C#
- Carbon (Macintosh)
- Cold Fusion
- Delphi
- Flash
- FoxPro
- HTML and XHTML
- Java
- Javascript and JScript
- JSP
- Perl
- PHP
- Python
- Ruby on Rails
- VB, VBA, and VB.NET
- VBScript
- XML and XSL
Database
Graphic Design
Operating Platforms
Hardware and Networking
Math and Science
Homework Help
Biology and GeologyMath and Statistics
Chemistry
Physics
Engineering
Are you an information
technology or
math/science expert?
You can earn money by
providing answers to questions
at AnswerArchive.com.
Learn How