Flare 12 and Word target ignoring table column widths

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Flare 12 and Word target ignoring table column widths

Postby kpendolino on Thu May 05, 2016 7:38 am

Hi Folks,

I'm in the process of testing Flare 12, and encountered an issue with table column widths in Word targets. It seems that column widths (both those set as styles in the col tags and those set using classes on the col tags) are ignored in Word output, but respected in PDF output. I've tested both relative units (em, %) and absolute (cm, in). In every test I've tried, Word targets just set all columns to equal width.

I've reported this to MadCap, but in the mean time, I'm wondering if anyone has found a work-around.

Here's one of the samples I tried. When output to Word, all of the columns appeared as 50%, regardless of what the width was set to.

Code: Select all
        <h1>Introduction</h1>
        <p>Here is some text in a table:</p>
        <table style="width: 100%;">
            <col style="width: 20%;" />
            <col />
            <tbody>
                <tr>
                    <td>This column has a set width of 20%</td>
                    <td>This column has its width set to auto</td>
                </tr>
            </tbody>
        </table>
        <table style="width: 100%;">
            <col style="width: 20pt;" />
            <col />
            <tbody>
                <tr>
                    <td>This column has a set width of 20 pt</td>
                    <td>This column has its width set to auto</td>
                </tr>
            </tbody>
        </table>
        <table style="width: 100%;">
            <col style="width: 20px;" />
            <col />
            <tbody>
                <tr>
                    <td>This column has a set width of 20 px</td>
                    <td>This column has its width set to auto</td>
                </tr>
            </tbody>
        </table>
        <table style="width: 100%;">
            <col style="width: 2.00cm;" />
            <col />
            <tbody>
                <tr>
                    <td>This column has a set width of 2 cm</td>
                    <td>This column has its width set to auto</td>
                </tr>
            </tbody>
        </table>
        <table style="width: 100%;">
            <col style="width: 2.00in;" />
            <col />
            <tbody>
                <tr>
                    <td>This column has a set width of 2 in</td>
                    <td>This column has its width set to auto</td>
                </tr>
            </tbody>
        </table>
        <table style="width: 100%;">
            <col style="width: 20em;" />
            <col />
            <tbody>
                <tr>
                    <td>This column has a set width of 20 em</td>
                    <td>This column has its width set to auto</td>
                </tr>
            </tbody>
        </table>


Thanks!
kpendolino
Jr. Propeller Head
 
Posts: 1
Joined: Thu May 05, 2016 6:36 am

Re: Flare 12 and Word target ignoring table column widths

Postby lanval on Tue May 24, 2016 10:41 am

We are having a similar issue with a table in the header frame of a page layout. No matter how we size the columns the second column ends up being just wide enough for a single letter.

Code: Select all
<Frame Flow="header" Anchors="Left,Right,Bottom" Right="-0.01041667in" Bottom="882px" X="0px" Y="-50px" ColumnCount="1" PaddingLeft="0in" PaddingRight="0in" PaddingTop="0in" PaddingBottom="0in" FlowIndex="3" Height="32px" VerticalAlign="bottom" TextAlign="left" Width="6.510417in" DividerWidth="0" BorderTopStyle="solid" BorderTopWidth="0px" BorderBottomStyle="solid" BorderBottomWidth="1px" BorderBottomColor="#a9a9a9">
            <Content>
                <xhtml:html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml">
                    <xhtml:head>
                    </xhtml:head>
                    <xhtml:body>
                        <xhtml:table xhtml:style="width: 100%;">
                            <xhtml:col xhtml:style="width: 50%;" />
                            <xhtml:col xhtml:style="width: 50%;" />
                            <xhtml:tbody>
                                <xhtml:tr>
                                    <xhtml:td xhtml:class="headfoot"><MadCap:variable xhtml:name="Terms.Manual Title Subject" />
                                    </xhtml:td>
                                    <xhtml:td xhtml:class="headfoot" xhtml:style="text-align: right;"><MadCap:variable xhtml:name="Heading.Level1" />
                                    </xhtml:td>
                                </xhtml:tr>
                            </xhtml:tbody>
                        </xhtml:table>
                    </xhtml:body>
                </xhtml:html>
            </Content>
        </Frame>
You do not have the required permissions to view the files attached to this post.
Cheers,
Michael
lanval
Propeller Head
 
Posts: 36
Joined: Wed Jul 19, 2006 12:21 pm
Location: Winnipeg MB

Re: Flare 12 and Word target ignoring table column widths

Postby Paul_N on Thu May 26, 2016 2:19 am

I wonder if this is related to the issue I'm having with changes to a print h1 tag being ignored in the PDF for content pages, but applied in generated PDF pages such as the ToC (my topic is viewtopic.php?f=10&t=27557)
Paul_N
Propeller Head
 
Posts: 48
Joined: Mon Feb 09, 2015 5:57 am
Location: Yorkshire, UK

Re: Flare 12 and Word target ignoring table column widths

Postby JudyH on Mon Nov 18, 2019 8:43 am

I know this is an old discussion, but I've been wrestling with a similar problem: Column widths that work fine in HTML5 and PDF but are reset to wrong widths (often equal-size) in Word.

This is as of Madcap Flare 2018 R2.

Some tables worked; others did not. I realized that the difference was that the "good" tables had a header row. The "bad" tables did not.

In Word, without a header row:
Image

In Word, the same table with a header row added and no other changes:
Image

It seems that Word targets ignore the set column widths if no header row is present. A bug? I thought, as a work-around, I could use the unwanted header row as my first row and override the formatting locally. It looked good in Flare but Word still applied the bold from the table style definition. (As noted earlier, I want headers for some tables but not for others.) So I created a copy of my table style, formatted the unwanted header row there to match the balance of the list, and applied that to my "no-header" tables. (The top row in the image below is actually the header row.)
Image

- EDIT - That work-around wasn't entirely satisfactory because headers, by design, repeat after a page break. I don't want these 'fake' headers to repeat. I've switch to creating very short empty headers. They take up a tiny bit of space and repeat, but at least they allow Word to respect the column widths.

This would be much easier (and far less frustrating) if Word targets would apply column widths whether or not a header is present, as HTML5 and PDF targets do.
Last edited by JudyH on Wed Dec 18, 2019 8:09 am, edited 1 time in total.
Judy Hennessey
Image
JudyH
Propeller Head
 
Posts: 63
Joined: Fri Oct 12, 2007 12:25 pm

Re: Flare 12 and Word target ignoring table column widths

Postby JudyH on Wed Dec 18, 2019 8:08 am

I've found a better work-around: Modifying the table style CSS to set the unwanted header, footer, or body sections to display: none. Again, PDF and HTML5 do fine without a table header row. This is necessary only if you also have a Word target (which requires both a header row and a body row).
Judy Hennessey
Image
JudyH
Propeller Head
 
Posts: 63
Joined: Fri Oct 12, 2007 12:25 pm


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 2 guests

cron