Highlighted

Avoid table split in PDF output

Participant ,
Feb 23, 2020

Copy link to clipboard

Copied

Hi 

I am using RH 2017. I am generating a PDF output from RH 2017 directly, i.e I am not generating a Word doc first and then converting to a PDF. In this scenario, I have noticed that the table splits in the PDF output. Please could you let me know what needs to be done to achieve the following:

  • I do not want the table to split - I would like the complete table to start from the next page rather than continuing to the next page.
  • Is it possible to have the table header repeated?
TOPICS
Classic

Views

276

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Avoid table split in PDF output

Participant ,
Feb 23, 2020

Copy link to clipboard

Copied

Hi 

I am using RH 2017. I am generating a PDF output from RH 2017 directly, i.e I am not generating a Word doc first and then converting to a PDF. In this scenario, I have noticed that the table splits in the PDF output. Please could you let me know what needs to be done to achieve the following:

  • I do not want the table to split - I would like the complete table to start from the next page rather than continuing to the next page.
  • Is it possible to have the table header repeated?
TOPICS
Classic

Views

277

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 23, 2020 0
Adobe Community Professional ,
Feb 23, 2020

Copy link to clipboard

Copied

I don't believe that can be done using the PDF output. If you generate to Word, then you can insert page breaks and set the first row to repeat. If there are many tables you could possibly create Word macro to do that.

 

There is a Word macro on my site that will find the next table. That would be a start to speeding up the process.

 

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 23, 2020 0
Contributor ,
Feb 24, 2020

Copy link to clipboard

Copied

I'm using 2019, but maybe 2017 works the same in this regard.

 

Repeating the table header you can do as follows:

<table>
<thead>

<tr>
<td>Repeating text col 1</td>
<td>Repeating text col 2</td>
</tr>
</thead>
<tbody>
Rest of the table

</tbody>

</table>

 

Preventing page breaks isn't very well implemented in RH PDF output, at least not in version 2019 new. Normally you should be able to add page-break-before/after/inside: avoid; to an element (such as the <table> element, or a <tr> element), but I've found that RH ignores most of these in many cases. The inside version is supported the most, but still very sparingly. Try to add them to different elements to see if it helps, for example, <table style="page-break-inside: avoid;"> (or add it to the CSS), however in 2019 new that one has no effect. I think in lists it does have effect but can't tell from the top of my head.

 

One thing that also doesn't work is avoiding page breaks after headers, which makes the pdf output almost unusable IMO, at least when you've got longer topics with H2 and H3.

 

Good luck! Hope this helps.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 24, 2020 0
Adobe Community Professional ,
Feb 24, 2020

Copy link to clipboard

Copied

Erwin - Remind me please. Are you using 2019 Classic or New UI?

 

I haven't tested but I thought Classic didn't support table headings but even if it did work with behind the scenes HTML, have you tested that it carries through to the PDF output. I'm not doubting you, just asking.

 

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 24, 2020 0
Contributor ,
Feb 24, 2020

Copy link to clipboard

Copied

In 2019 new UI it carries through to the pdf, just tested it to be sure. Making everything <tbody> doesn't repeat the top line (just tested that too 🙂 .

 

In fact, I think the output of the PDF in the new UI looks really good, apart from the dealbreaker of not being able to control pagination inside long tables and after headings.

 

I'd hate to be forced to go through Word just for that, because in the PDF, all lists look exactly the same as they do in HTML, while in Word it needs a lot of extra formatting. In that respect, the new UI works worse for Word than the old UI, because pure HTML lists are a lot harder to translate to Word than the pseudo-multi-level-lists that the old UI used (at least during my previous experience with RH9, I have not used RH after that, so not sure if they changed the list structure after then). These pseudo-lists were much more like (inspired by?) the Word multi-level lists.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 24, 2020 0
Participant ,
Mar 01, 2020

Copy link to clipboard

Copied

Thank you Peter and Erwin.

 

Erwin - Let me give it a try and check how well it goes. Will post an update here.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 01, 2020 0