 |
| CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS). |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 15th, 2009, 05:00 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Printing Tables
I'm having issues with tables which are dynamically generated depending on answeres provided by a user. The html for the tables is then converted to a PDF document, the problem I am having is sometime the tables are breaking over 2 pages, and looks very undesirable. I have been looking at possible solutions ( using orphans, page-break-inside:avoid ), but havent had any success with any of these options just yet. Does anyone have any ideas ?
|
|

April 21st, 2009, 04:09 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
|
|
How do you want this to react? This is fairly complicated because you're not only dealing with the table code but PDF behavior as well. Not sure if I can help, but I'll see what I can do.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|
|

April 21st, 2009, 04:17 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Preventing the pages breaking in the middle of a table is the solution I am looking for. Without creating a pagebreak before each table as the tables are quite small. This looks fine for the html version of the tables , but gets very messy with the pdf doc. Each a user inputs data into my web app where the tables appear can be different or the tables may not appear at all !! I would be much obbliged if you can help me with this.
Cheers
|
|

April 23rd, 2009, 12:43 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
|
|
Quote:
Originally Posted by miker169
I'mI have been looking at possible solutions ( using orphans, page-break-inside:avoid ), but havent had any success with any of these options just yet.
|
I know there are some CSS printing control commands in CSS though I haven't worked with them, but then it looks like this is what you've tried correct?
PS Kudos for looking to the CSS! I'm a big believer in Web Standards and get depressed when I see people pouring on the inline style elements through the control properties. It's their website, but it bugs me seeing people use techniques so devastating to the website's maintainability.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|
|

April 23rd, 2009, 03:41 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I think the web standards is the problem some of the paged media elements such as orphans, widows etc just aren't implemented within some browsers. Not IE6 or IE7 which is a requirement( why can't everyone use ff , would make us developers lives much easier ) unfortunately and also not in the PDF engine I am using ( web supergoo's ABCPDF ). So I have created a temporary solution, which is to create calculated page breaks, its not pretty and its not easily maintable and its not easy to read, but works (for now at least) until I come up with a better solution.
|
|
 |