Background Color:
 
Background Pattern:
Reset
Search

Forum

Please Log In

We want you to contribute! 

This forum is a moderated environment. 
We try to keep it neat and tidy. In order to access the forum content we would like you to either or register.

HomeHomeScryberScryberDevelopment Que...Development Que...Keep 2 components together on the same pageKeep 2 components together on the same page
Previous
 
Next
New Post
3/14/2017 7:43 AM
 

Hello everybody,

is there any option to keep 2 components together on the same page if they normally would be splitted onto 2 pages?

I have multiple headings and corresponding content Labels like this:

<pdf:H3 id="DescriptionHeading" text="{item:DescriptionHeading}" style:class="Heading" />

<pdf:Label id="DescriptionContent" text="{item:DescriptionContent}" />

The heading should be on the same page as the beginning of the content.

Is this possible?

Greetings

Thilo

 
New Post
3/14/2017 9:26 AM
 

Hi Thilo

You can keep groups of components together in a single block using the style:overflow-split option on a parent container.

    <pdf:Section style:margins="20pt" style:border-color="green">

      <Content>

        

        <pdf:Div style:border-color="black" style:height="770pt" >Spacer</pdf:Div>

        

        <!-- This block should never split across columns or pages. -->

        <pdf:Div style:overflow-split="Never" style:border-color="aqua" >

          <pdf:H3 text="This is the heading" ></pdf:H3>

          <pdf:Label text="This is the label" />

        </pdf:Div>

      </Content>

    </pdf:Section>


 

 
New Post
3/14/2017 9:43 AM
 
I've already tried this solution but the label should split across pages if it has too much content.
 
New Post
3/20/2017 7:16 AM
 

Maybe if I do it with C# code?

Like: if heading.Page != content.Page then add page break before the heading

Is this possible? There is not much documentation about C# code.

 
New Post
3/20/2017 8:29 AM
 

Once the content has been laid out Thilo, it would be really difficult to go back up and re-order.

It may be easier to split the DescriptionContent into 2 or more paragraphs, keeping the first one with the heading.

Richard

 
Previous
 
Next
HomeHomeScryberScryberDevelopment Que...Development Que...Keep 2 components together on the same pageKeep 2 components together on the same page