• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

RH14.0.9 PDF output displays heading and content separately as page breaks.

Community Beginner ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

I am trying to put heading and paragraph on same page. If page breaks heading should moves to another page together with content and same goes for table heading row and other row. Is there any way to correct it or is this the way robohelp works? Please help.

 

Sample1.pngSample 2.png

Views

393

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
community guidelines

correct answers 1 Correct answer

Contributor , Nov 20, 2019 Nov 20, 2019

I have found a workaround for the headings issue. The text stays together if you do this:

<div style="page-break-inside:avoid;">
<h2>text</h2>
<p>text</p>
</div>

You could use a find-replace with regular expressions to add this in bulk to many different htm files if you've got a big project.

However, this doesn't work for the table issue because you can't put divs in tables like that. Maybe around them but then it would keep the whole table together, which is probably not what you want.

 

Anyway, I'm ha

...

Likes

Translate

Translate
Community Expert ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

How are you creating your PDF? You will probably get finer control if you go the RH > Word > PDF route.

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
community guidelines
Community Beginner ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

Hi Jeff. Thank you for your support. I tried generating word document and converted to pdf but still issue persist. Am I doing something wrong?

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
community guidelines
Contributor ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

I was going to ask the exact same thing, about the table break-up. But indeed I have now tried and also cannot keep the headings and the following text on one page.

 

CSS has a simple property for that: page-break-before/after: avoid. Or page-break-inside: avoid. But it doesn't matter where I put this, RH does not listen when generating to PDF. So am I doing something wrong, or is this also not implemented? That would be a deal breaker for me. Keeping headings together with the text that follows them is essential IMO.

 

It would be a real shame if this wasn't implemented. Adobe seems to have put quite some effort in creating pdf output, but without this feature, the only viable option remains the Word route in my case.

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
community guidelines
Community Beginner ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

Thank you, Erwin. I wanted to know if you are able to resolve the issue through RH>word>pdf route. I tried taking pdf output from word but still getting the same issue.

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
community guidelines
Contributor ,
Nov 20, 2019 Nov 20, 2019

Copy link to clipboard

Copied

I have found a workaround for the headings issue. The text stays together if you do this:

<div style="page-break-inside:avoid;">
<h2>text</h2>
<p>text</p>
</div>

You could use a find-replace with regular expressions to add this in bulk to many different htm files if you've got a big project.

However, this doesn't work for the table issue because you can't put divs in tables like that. Maybe around them but then it would keep the whole table together, which is probably not what you want.

 

Anyway, I'm happy I found this workaround. I've already spent a lot of time getting the PDF output just right so now I don't need to abandon it just for this.

 

I'm not ready with the Word route yet anyway, the Word output from my project is still a complete disaster for now (huge fonts, mapped lists that are not mapped to the assigned list styles but end up being Normal typed text, etc.)  But I do know how you could solve the staying together of headings and text in Word.

 

You need to add "keep with next" to all heading styles, as follows:

  1. Press Ctrl + Alt + Shift + S to open the Styles pane.
  2. In the list, right-click on the Heading 1 style and select Modify.
  3. Click the Format button and select Paragraph.
  4. Select the Line and Page Breaks tab.
  5. Select the Keep with next checkbox.
  6. Click OK etc. to confirm.

 

Repeat this for Heading 2 etc. If you're lucky, you'll find that the check box is already selected, if Heading 2 is based on Heading 1. In that case you don't have to do the other headings. Otherwise, repeat this for all headings that you want to modify.

Now, all headings stay on the same page as the text that comes after them.

 

The other options in the list can also be very useful BTW. For example, if you select Page break before for Heading 1, this heading will always start on a new page. Or Keep lines together can prevent text in a table from breaking to a new page mid-sentence.

 

Good luck!

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
community guidelines
Community Beginner ,
Nov 20, 2019 Nov 20, 2019

Copy link to clipboard

Copied

Thank you so much. will try this. 

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
community guidelines
Community Beginner ,
Nov 21, 2019 Nov 21, 2019

Copy link to clipboard

Copied

Thank you, Erwin. Have tried both div tag and word routes. As you described heading and the following text are on the same page. I am assuming that if we need to follow div tag route then all the headings must be created using DIV tag.

 

I hope adobe will bring some permanent solution for heading and table issues in future.

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
community guidelines
Community Expert ,
Nov 20, 2019 Nov 20, 2019

Copy link to clipboard

Copied

When you created the Word doc, did you edit/manipulate it so that it looked right before printing it to PDF? That's what I meant by finer control over the process. You have to realize that RH was never intended to create super-great PDFs - it's focus was on HTML creation; Word, on the other hand, is focused mainly on printing (& not so much on HTML). Different focus - different tools.

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
community guidelines
Contributor ,
Nov 20, 2019 Nov 20, 2019

Copy link to clipboard

Copied

Jeff, I agree with you that RH was focused on HTML and not print. But CSS has in principle much more styling options than Word does, providing for "what if an image comes after a bulleted list" etc. In Word you'd need a ton of styles for all these situations. So the PDF option could be really really great, if Adobe would actually implement the CSS styling as it was meant to be, including the ones especially made for printing.

 

They have put all this effort into making a PDF option, but when push comes to shove, everyone says "nah, use Word instead". That's just a shame I think. With just a bit more effort they could have a really good PDF output. I hope they finish the PDF implementation to include the page break before/after styles.

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
community guidelines
Contributor ,
Nov 21, 2019 Nov 21, 2019

Copy link to clipboard

Copied

LATEST

I have made a feature request with Adobe: 

https://tracker.adobe.com/#/view/RH-6087

 

If anyone who also wants this votes for this issue over there, it might get more attention.

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
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp