Table Style--Print Suport

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
hc_tw
Jr. Propeller Head
Posts: 6
Joined: Wed Mar 14, 2007 1:57 pm

Table Style--Print Suport

Post by hc_tw »

I don't want my a table to be split up between pages. I've set the Print Support \"page-break-within\" to \"avoid\", but they are still being split. I've also played with the widow/orphan options to no avail. Am I missing something?

Thanks!
Dana
mattf
Sr. Propeller Head
Posts: 277
Joined: Thu Feb 09, 2006 5:35 pm
Location: Next to the window

Post by mattf »

hi hc_tw

Are you using Word? This sounds like the sort of problem I commonly have in Print media -- set a style in the obvious place in the stylesheet and yet no result or wacky results (currently having this issue with borders and padding.)

I would not hesitate to offer to send your project to Flare if you have the platinum support. They respond quickly, and usually within a day they'll let you know what they've uncovered. I've done this a few times after getting no love from the Help or here in the forum and it usually ends up being a bug. There seem to be a lot of issues with Word in particular. This smells like one of those. The table style \"page-break-within\" and \"avoid\" clearly says what it intends to achieve, and if it isn't happening, it's something that needs to be fixed.

I \"know\" you selected Print under media in the stylesheet, right? (But even if you left it at Default and set this style, it should work for Print).

Good luck.

MattF
smihaly
Jr. Propeller Head
Posts: 1
Joined: Mon Dec 11, 2006 1:06 pm
Location: Cary, NC

table style - print support

Post by smihaly »

I am having a similar problem in Word output. I am not sure how to prevent a table header row from staying with at least one table row. In other words, I have p. 1 with a header row only at the bottom of the page, then at the top of p. 2 the header row recurs with the the actual table appearing after. In the past, I searched the help file, read through the forums, and changed settings in the style sheet (trial and error fashion) before eventually giving up. Well, here I am again. Any suggestions? Thanks!
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Post by doc_guy »

I filed a similar bug just yesterday. I encourage you to do the same. My specific problem was I wanted to have a property that Word recognized that prohibits rows from breaking across page breaks.

Seems there could be a lot of improvements with Table handling in Word output.
Paul Pehrson
My Blog

Image
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

(Solved) Re: Table Style--Print Suport

Post by navoff »

I've figured out how to prevent rows from breaking across pages. It requires editing the raw css file for the table stylesheet. What I did is open the table stylesheet up in a text editor (you can use the internal one in Flare, just right click the css file and select "Open with >> Internal text editor").

Then, for all the .*Body* classes (for example, .TableStyle_Basic_Body_0_0_ColEnd) I added the following line:

Code: Select all

page-break-inside: avoid;
All of my table rows now stay intact and will not have a page break inside them. You could also include the line for any of the .*Head* classes too, if you have problems with them breaking funny.
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Style--Print Suport

Post by LTinker68 »

You should be able to set the page-break-inside property on the <td> class in the main topic stylesheet to "avoid". Unless that property is expressly stated in the table stylesheet, of course, in which case the table stylesheet setting wins because it's usually listed second in the topic. But... If you haven't set that property in the table stylesheet, then you should be able to set it in the base <td> tag in the main topic stylesheet. That'll be easier than manually editing the table stylesheet.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Re: Table Style--Print Suport

Post by navoff »

Well, therein lies the problem. All the td tags in the tables are calling styles set in the table stylesheet. For example:

<td class="TableStyle_Basic_Body_0_0_RowSep_ColSep">

So, the only way to get the td tags to do what I wanted was to edit the table stylesheet.
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Style--Print Support

Post by LTinker68 »

Right, but cascading rules state that if a class doesn't specify a value for a specific attribute, then it will inherit the value of that attribute from the parent. Likewise, if the attribute isn't specified in one stylesheet, but the previously-called stylesheet has that value, then it should pull the value from there. So if the "TableStyle_Basic_Body_0_0_RowSep_ColSep" class in the table stylesheet doesn't have a value set for the page-break-inside attribute, then it should pick up the value you specify for the <td> tag in the topic stylesheet.

That said, if setting the page-break-inside in the <td> tag for the main topic stylesheet didn't work, then it's possible that Flare's MadCap.css stylesheet has the attribute set to something else and that stylesheet is overriding the topic stylesheet. So if setting it in the main topic stylesheet didn't work, then you would have to set it manually in the topic stylesheet file, as you did.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
tomjohnson1492
Propeller Head
Posts: 90
Joined: Wed Nov 07, 2007 11:08 pm
Location: Salt Lake City
Contact:

Re: Table Style--Print Suport

Post by tomjohnson1492 »

Navoff, your solution totally worked for me. Thanks.
-------------
my blog/podcast: http://www.idratherbewriting.com
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Table Style--Print Suport

Post by garyjgeoaccess »

For whatever it's worth:

You can set the TR tag to "page-break-inside: avoid" in your topic stylesheet. As Lisa indicated, this will be picked up by all your table rows. In my experience, you don't have to set "page-break-inside: avoid" for each table cell style in your table stylesheets.

I've tested this and can turn on and off page breaks inside all table rows by using this style.

It works ... for PDF output. I have not tested it with Word output.
tomjohnson1492
Propeller Head
Posts: 90
Joined: Wed Nov 07, 2007 11:08 pm
Location: Salt Lake City
Contact:

Re: Table Style--Print Suport

Post by tomjohnson1492 »

Actually, I thought the page-break-inside would make it so rows wouldn't break from one page to the other, but it's not working for me. I'm generating a Word output. In some cases, the text in the table row just continues to the next page. I have the page-break-inside property set for the tr tag in my topic stylesheet as well as applied to each of the body classes in the table stylesheet. Is this a bug in Flare?
-------------
my blog/podcast: http://www.idratherbewriting.com
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: Table Style--Print Suport

Post by pdenchfield »

I don't think this function is supported in Word output. I set the "page-break-inside: avoid" property on <tr> in my topic stylesheet and tried building both outputs. Word still breaks the table rows but PDF doesn't.
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Table Style--Print Suport

Post by garyjgeoaccess »

Sounds like conclusive proof that it's a Word output bug. All Word users should report this as a bug. I'm not a Word user, but if I were, this would be a big problem. I'd recommend putting together a small sample project that illustrates the problem and attaching it to your bug report.

Does navoff's workaround (editing each td style in the table stylesheet) work for Word users?

If not, here's another workaround to consider. Create a DIV style with "page-break-inside: avoid". Select the contents of the problematic cell. Group the contents, applying the new DIV style.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table Style--Print Suport

Post by LTinker68 »

garyjgeoaccess wrote:If not, here's another workaround to consider. Create a DIV style with "page-break-inside: avoid". Select the contents of the problematic cell. Group the contents, applying the new DIV style.
Is that wordaround for Word? Because Word ignores DIVs.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
tomjohnson1492
Propeller Head
Posts: 90
Joined: Wed Nov 07, 2007 11:08 pm
Location: Salt Lake City
Contact:

Re: Table Style--Print Suport

Post by tomjohnson1492 »

Hmmm, I guess I'll just live with rows breaking across pages. I have a Word macro I use to clean that up. However, my macro creates another problem: it creates header rows that sometimes get orphaned. I posted a screenshot here: http://forums.madcapsoftware.com/viewto ... =10&t=8926

It seems I have to choose between either orphaned header rows or body rows that break across pages. I'll take the latter evil, if it is even an evil.
-------------
my blog/podcast: http://www.idratherbewriting.com
beelia
Propeller Head
Posts: 23
Joined: Wed Mar 28, 2007 12:30 pm
Location: Mountain View, CA
Contact:

Re: Table Style--Print Suport

Post by beelia »

I know this discussion was mostly about Word output, but I just thought I'd let you know that page=break-inside: avoid; worked for my PDF output.

Thanks!

Bee
Bee Hanson

NetApp, Inc.
(650) 464-6667 (Cell)
Post Reply