5

I have to skip the content of vf page (renderAs=pdf) to the next page whenever page body found <<next page>>. Below is my requirement: -

The first(left) page should be split in two pages as shown below. Content below <<skip content>> should be moved in next page

Any assistance to achieve this would be greatly appreciated. Thanks!!

1
  • I have the same requirement too. Waiting for the answer. Nov 8, 2014 at 20:08

2 Answers 2

15

I'm not clear whether <<skip content>> is something you actually output or not.

Outputting this instead:

<div style="page-break-after: always"/>

would move the following content to a new page via CSS. See e.g. How to render Multiple PDFs from a single Visualforce page? for more detail.

3

You can push it with CSS, for example on a div tag:

div.Ending { page-break-after: always; }

There's a suggested reference I found somewhere in Salesforce help which covers most of the things the PDF engine can do, including page breaks, page numbering, margins, headers, footers, etc. even internal page linking and index generation.

It has really helped me out with some tricky form generation. It's all controlled through an external style sheet and css. See this link:

Introduction to page composition with CSS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .