Skip to main content
1-Visitor
January 29, 2014
Question

S1000D PDF Table Output Column Widths

  • January 29, 2014
  • 30 replies
  • 8902 views
Ok, I'm using v5.3 of the editor with CSDB and I've created some S1000D
PDF output using the "Publisher" and I've noticed that the tables as
output completely ignore the column settings. Instead of getting columns
of variable width I get columns of equal width. In the output the
columns are equally divided between 38 pi, which is total chaos. I have
content running across cell borders etc.

I have clearly set the columns as follows:

<table colsep="1" frame="all" rowsep="1">

<title>Something</title>

<tgroup cols="7" tgstyle="1"><colspec<br/>
colwidth="2.00pi"/><colspec colwidth="7.50pi"/">

<colspec colwidth="3.00pi"/"><colspec<br/>
colwidth="2.00pi"/><colspec colwidth="10.00pi"/">

<colspec colwidth="7.00pi"/"><colspec<br/>
colwidth="3.00pi"/>


I suspect this is a problem with the Publisher; it doesn't create Issue
4 compliant covers either. Does anyone know if there is an attribute
which can be set in the XML to force the output to use the column widths
as entered?

    30 replies

    1-Visitor
    January 29, 2014
    Not  sure if it will really make a difference, but try adding a colname attribute to your colspec tag.

    <colspec colname="col1" colwidth="2.00pi"/">


    Trudy



    On Wednesday, January 29, 2014 9:34 AM, Greg MacKenzie <-> wrote:

    Ok, I'm using v5.3 of the editor with CSDB and I've created some S1000D
    PDF output using the "Publisher" and I've noticed that the tables as
    output completely ignore the column settings. Instead of getting columns
    of variable width I get columns of equal width. In the output the
    columns are equally divided between 38 pi, which is total chaos. I have
    content running across cell borders etc.

    I have clearly set the columns as follows:

    <table colsep="1" frame="all" rowsep="1">

    <title>Something</title>

    <tgroup cols="7" tgstyle="1"><colspec<br/>
    colwidth="2.00pi"/><colspec colwidth="7.50pi"/">

    <colspec colwidth="3.00pi"/"><colspec<br/>
    colwidth="2.00pi"/><colspec colwidth="10.00pi"/">

    <colspec colwidth="7.00pi"/"><colspec<br/>
    colwidth="3.00pi"/>


    I suspect this is a problem with the Publisher; it doesn't create Issue
    4 compliant covers either. Does anyone know if there is an attribute
    which can be set in the XML to force the output to use the column widths
    as entered?

    ----------
    1-Visitor
    January 29, 2014
    Hi Trudy,

    Good catch! No joy though, I gave colnum a try as well, neither seem to make a difference. When I create a PDF via the toolbar, I still get evenly divided columns.

    Thanks anyway!

    Greg
    🙂
    18-Opal
    January 29, 2014
    Hi Greg--

    You may need to change the way your sizes are specified. XSL-FO doesn't support "pi" as a recognized unit abbreviation. If you are looking for Picas, use "pc" instead. Or you can convert to any of the other supported units (described here:
    1-Visitor
    January 29, 2014
    Hi Clay,

    Thanks for the link. 🙂 I must admit I got into the habit of using picas a long time ago and still do in our SGML, that's why I never gave it a second thought.

    I changed the attribute from pi to pc, but as soon as I use "CSDB Save" they revert to pi, except for the first two columns... very strange...

    When I create a PDF though from the toolbar the format of the first two columns is correct, so this must be the right track.

    I'll be back...

    Greg
    🙂
    1-Visitor
    January 29, 2014
    This is almost working. I edited the xml as source and this is what I changed them to:

    <tgroup cols="7" tgstyle="1">
    <colspec colname="1" colnum="1" colwidth="2.00pc"/">
    <colspec colname="2" colnum="2" colwidth="7.50pc"/">
    <colspec colname="3" colnum="3" colwidth="3.00pc"/">
    <colspec colname="4" colnum="4" colwidth="2.00pc"/">
    <colspec colname="5" colnum="5" colwidth="10.00pc"/">
    <colspec colname="6" colnum="6" colwidth="7.00pc"/">
    <colspec colname="7" colnum="7" colwidth="3.00pc"/">

    However, some revert to their original values with CSDB Save. This is what they look like now after CSDB save:

    <tgroup cols="7" tgstyle="1">
    <colspec colname="1" colnum="1" colwidth="2.00pc"/">
    <colspec colname="2" colnum="2" colwidth="7.50pi"/">
    <colspec colname="3" colnum="3" colwidth="3.00pc"/">
    <colspec colname="4" colnum="4" colwidth="2.00pi"/">
    <colspec colname="5" colnum="5" colwidth="10.00pi"/">
    <colspec colname="6" colnum="6" colwidth="7.00pi"/">
    <colspec colname="7" colnum="7" colwidth="3.00pi"/">

    Columns 1 and 3 are ok, but the rest reverted to pi for some reason. I think I'm going to delete the attributes, save to CSDB, and redefine them.
    1-Visitor
    January 29, 2014
    Interestingly, if you delete all the colspec markup and "CSDB Save" the colspec is redefined in pi by default. The following is the default output, not unreasonable except for "pi":

    <tgroup cols="7" tgstyle="1"><colspec<br/>colwidth="6.00pi"/><colspec colwidth="6.00pi"/">
    <colspec colwidth="6.00pi"/"><colspec<br/>colwidth="6.00pi"/><colspec colwidth="6.00pi"/">
    <colspec colwidth="6.00pi"/"><colspec<br/>colwidth="6.00pi"/>

    I changed the values the way I wanted them and substituted "pc" for "pi", and created a pdf, the columns that take do output as desired but some of others don't, the markup colwidth values revert to pi without CSDB Save!
    18-Opal
    January 29, 2014
    That sounds like a bug to me. You might want to let PTC know about it, they may be able to recommend a fix in the XSL stylesheet or somewhere else.

    --Clay
    1-Visitor
    January 29, 2014
    Hi Clay,

    It's an idea at that. 😉 Mind you I am stuck in the world of 5.3 at the moment... Usually responses invoke comments such as "your CSDB version is unsupported" and "you should upgrade..." However such things are not up to me and lie in the hands of powers beyond my ken...

    I'll try another measurement, metric, and see if that stays put.

    Greg
    🙂
    18-Opal
    January 29, 2014
    In that case, if you know some XSLT, you can probably modify the XSL stylesheets that are used for publishing. You would just need to modify it so that it checks the colwidth attribute on colspec, and if it contains "pi" change it to "pc" before passing it through to the FO engine.

    --Clay
    1-Visitor
    January 29, 2014
    Picturing Elrond's Council or a Balrog after that comment. 🙂

    I love that people are still gaining value from the older Arbortext versions.