Perfect tables in PDF?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
jwatson
Propeller Head
Posts: 59
Joined: Tue Aug 26, 2008 9:15 am
Location: Victoria, BC

Perfect tables in PDF?

Post by jwatson »

Hey

Just wondering if anyone has perfected the art of tables in PDF output? Any tips you can share with those of us struggling? Perhaps you have a list of things you manually set to get your tables to break for pages correctly?

I've tried page-break-inside=avoid on rows, in cells, on paragraph styles....What am I missing? It's tables with 3 or more columns and merged cells which really seem to create problems.

Jenny.
Jenny
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Perfect tables in PDF?

Post by garyjgeoaccess »

Jenny:

I've simplified my tables considerably. Flare does some unpredictable things with spans. So I've eliminated spans as much as possible. I still have some spans, but they're rather simple (two column tables with spans in column one). My simple tables behave very well. I've turned on "page-break-inside: avoid" for rows. Works like a charm. I always get decent page breaks.

So I haven't actually "perfected the art of tables" but I'm working within the constraints and getting good output.

In fact, as a company, we will soon be generating all of our software user guides with Flare PDF output. I've been doing this with my own guides for the past two to three months.

But in the case of tables, yes, it meant we simplified considerably. (To be fair, we had actually already simplified most of our tables for WebHelp output.)

I wrote the guide that our tech writers will be using for preparing their PDF output. What do I say about tables in this guide?

I say to rip out any pixel dimensions that got set for row height and column width. This happened frequently, when we imported docs from FrameMaker, and through the tweaking of rows and columns in Flare (our writers love to tweak--try to avoid it!). In general, remove all the pixel dimensions. Use AutoFit to Contents (in Table Properties). In the topic stylesheet, we specify that tables in WebHelp should be 95% wide, and tables in PDF output are either 4.5 inches wide or 6 inches wide, depending on the table style selected. If you need to tweak column width, use percentages (and don't expect that Flare will really pay much attention to what you enter).

This is working for us. However, the process of cleaning up tables will be one of the major tasks for our technical writers (along with adding style adjustments to make sideheads work, dealing for image size issues, and planning how to make page breaks work).

I hope this helps.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Perfect tables in PDF?

Post by LTinker68 »

garyjgeoaccess wrote:Flare does some unpredictable things with spans. So I've eliminated spans as much as possible. I still have some spans, but they're rather simple (two column tables with spans in column one).
Just to clarify to avoid confusion... You're using "span" in this instance to refer to a merged cell, correct, and not the <span> tag?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Perfect tables in PDF?

Post by garyjgeoaccess »

You got it. Row spans and column spans (i.e., merged cells).

I'm a web designer. Regarding tables, I think in terms of rowspans and colspans.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Perfect tables in PDF?

Post by LTinker68 »

garyjgeoaccess wrote:I'm a web designer. Regarding tables, I think in terms of rowspans and colspans.
As am I (that's one of my jobs anyway). But some of the users on the forum aren't coming from a web background, so I just wanted to clarify the terminology, especially since they'll see the word "span" if they have the show blocks turned on and they've applied a span, but they'll never see the words rowspans and colspans unless they open the topic in the Internal Text Editor or Notepad.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Doug Eaton
Propeller Head
Posts: 68
Joined: Tue Feb 19, 2008 9:47 am

Re: Perfect tables in PDF?

Post by Doug Eaton »

garyjgeoaccess wrote:...tables in PDF output are either 4.5 inches wide or 6 inches wide, depending on the table style selected. If you need to tweak column width, use percentages (and don't expect that Flare will really pay much attention to what you enter).
I've been fighting exactly this battle. Does the above mean create two table styles: one with a print output 4.5" wide and one with a print output 6"?
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Perfect tables in PDF?

Post by garyjgeoaccess »

Well, you need two table styles, yes, but I actually set the table width for these tables in the print section of the topic stylesheet.

You can do it in the table stylesheets (by adding a print section), but I'd rather keep my editing in one stylesheet, if possible. You just need to know how Flare names the classes for your tables, which look like this (in my experience): table.TableStyle_(plus the table style name).

So my topic stylesheet looks like this:

table.TableStyle_TNtable,
table.TableStyle_TNtableFull
{
margin-left: 1.5in;
margin-right: 0.0in;
margin-top: 10pt;
margin-bottom: 10pt;
font-size: 10pt;
line-height: 12pt;
padding: 0pt;
width: 4.5in;
font-family: 'CG Omega';
}
table.TableStyle_TNtableFull
{
margin-left: 0in;
width: 6in;
}

So TNtableFull has most of the same properties as TNtable; however, it's not indented and it's 6 inches wide (the width of the body frame). While TNtable is indented 1.5 inches and it's 4.5 inches wide (the width of the body text).

[Sorry if my tendency to combine styles creates confusion. I edit the stylesheet by hand. The alternative is to repeat attributes ad nauseum (Flare's method). Separate styles would look like this:]

table.TableStyle_TNtable
{
margin-left: 1.5in;
margin-right: 0.0in;
margin-top: 10pt;
margin-bottom: 10pt;
font-size: 10pt;
line-height: 12pt;
padding: 0pt;
width: 4.5in;
font-family: 'CG Omega';
}
table.TableStyle_TNtableFull
{
margin-left: 0in;
margin-right: 0.0in;
margin-top: 10pt;
margin-bottom: 10pt;
font-size: 10pt;
line-height: 12pt;
padding: 0pt;
width: 6in;
font-family: 'CG Omega';
}
kcann
Propeller Head
Posts: 64
Joined: Wed May 27, 2009 7:03 am

Re: Perfect tables in PDF?

Post by kcann »

I have set tr, td and pTable all to 'avoid' break inside, but it doesn't seem to have any effect in the Word output. Has anyone encountered this before?

Thanks!

K
jwatson
Propeller Head
Posts: 59
Joined: Tue Aug 26, 2008 9:15 am
Location: Victoria, BC

Re: Perfect tables in PDF?

Post by jwatson »

Is it just me, or are tables working better in PDF output from Flare 5? Yay for Madcap for fixing this!
Jenny
Post Reply