PDF: Table or table cell with width of content

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
markusflow
Posts: 50
Joined: Tue Apr 30, 2019 4:29 pm

PDF: Table or table cell with width of content

Unread post by markusflow »

Hi all,

I am trying to create a table (1 column) with the dynamic width of the content (max. width = width of PDF template width, of course).
Is there a way to do that? Autosize option will do this for web output, as documentation stated. Any chance to get this done for PDF?

Background:
I need to create a paragraph with a line above the text. The line should end with the last character (more or less). Due to paragraph border creates a line over the whole paragraph, my idea was to create a table with 1 column and 2 rows. Row 1 with a line (as background image), row 2 (with white background) contains the text. This works, but I have to resize each table manually for ending the line above the last character.

Thanks.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: PDF: Table or table cell with width of content

Unread post by Tim Green »

Hi Markus,

There's a trick you can use to achieve this: Turn off word wrap for the paragraph you are using to "size" the table. Then the text is an unresizable block, just like a graphic. Then in the table properties select the selected cells tab and set the preferred width to something slightly less than the minimum width expected for the text. Since content has priority in table sizing this will force the table to have exactly the same width as the content.

WARNING: Caution with this method in multi-column tables! That will make Help+Manual set the widths of ALL columns to automatic, which will not produce desirable results in many cases. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
markusflow
Posts: 50
Joined: Tue Apr 30, 2019 4:29 pm

Re: PDF: Table or table cell with width of content

Unread post by markusflow »

Thanks, Tim. I will try your tip. :typing:
Post Reply