Page break in PDF

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Page break in PDF

Unread postby John Johann » Wed Aug 08, 2018 8:33 am

V7.3.6 Build 4521
I have a project for CHM and pdf output.
Some topics for structural purposes (not top level) in the TOC are empty.

Code: Select all
<topic template="Default" lasteditedby="Me" version="2">
  <title>Title for structuring</title>
      <para styleclass="Heading1">Title for structuring</para>
    <para styleclass="PageBreak" style="page-break-before:always;"></para>
    <para styleclass="PageBreak"></para>
    <para styleclass="Normal"><conditional-text type="IF" value="CHM,HTML,EBOOK"/><text styleclass="Normal" style="font-weight:bold;">See:</text></para>
    <para styleclass="Normal"><link displaytype="text" defaultstyle="true" type="topiclink" href="Subchapter1">&lt;%TARGETTITLE%&gt;</link></para>
    <para styleclass="Normal"><link displaytype="text" defaultstyle="true" type="topiclink" href="Subchapter2">&lt;%TARGETTITLE%&gt;</link></para>
    <para styleclass="Normal"><link displaytype="text" defaultstyle="true" type="topiclink" href="Subchapter3">&lt;%TARGETTITLE%&gt;</link><conditional-text type="END"/></para>

The styleclass "PageBreak" is defined with a tiny font size and no spacing. If I enclose those two lines in an IF PDF condition, the page break is lost. If I only insert one line with the page break, it is ignored.

What is the elegant solution here (while keeping empty topic :-))?
John Johann
Posts: 128
Joined: Mon Aug 21, 2017 7:35 pm

Re: Page break in PDF

Unread postby Tim Green » Thu Aug 09, 2018 7:25 am

Hi John,

You don't need to enclose the page break paragraph in a condition because page breaks are ignored in all output formats except PDF and DOCX anyway. Losing the page break when it is directly followed by a conditional tag is a known limitation. You can get around it by inserting a single space directly before the opening IF tag, which will look like this in the XML:

<para styleclass="Normal" style="page-break-before:always;"><text styleclass="Normal" translate="true">&#32;</text><conditional-text type="IF" value="CHM,HTML,EBOOK"/><text styleclass="Normal" style="font-weight:bold;" translate="true">See:</text></para>
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 20585
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Page break in PDF

Unread postby John Johann » Thu Aug 09, 2018 4:29 pm

Hi Tim,
I knew there was a reason why I had created the mini page break style --> to reduce the space between the header and the subchapter as otherwise the paragraph is formatted the same as the IF condition.

So for the moment, I insert one page break style paragraph with a space and the page break above the IF condition.
John Johann
Posts: 128
Joined: Mon Aug 21, 2017 7:35 pm

Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 4 guests