Re: FOP - page 2 not displayed when there is no overflow from page 1

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: FOP - page 2 not displayed when there is no overflow from page 1

Andreas Delmelle-2
Hi

Kind request/reminder:
Please use fop-users@ for general usage questions. Thanks!

Now that that is out of the way:

> On 29 Nov 2017, at 06:59, gauravabburi <[hidden email]> wrote:
>
> I am trying to generate a PDF with multiple pages. I have a static page 2
> which is to be generated even when there is no overflow from page 1.
> However, that is not happening.
> In case there is an overflow from page 1, I want it to be displayed in page
> 3.
> Page 1 -> "first"
> Page 2 -> "terms"  - static page
> Page 3 -> "rest"   -  overflow from Page 1
> Code snippet :

<snip />

Off the top of my head, I would say that the most straightforward way to always force that second page would be to set the "force-page-count" attribute on the fo:page-sequence. See: https://www.w3.org/TR/xsl/#force-page-count

A value of "even" or "end-on-even" should suffice to make it work, possibly in combination with an additional page-master for "blank" last pages if they are not the second.
So, an unavoidable consequence of this approach is that this will generate an extra blank page at the end, if the content were to end on an odd page... If you can live with that, this should be enough to guarantee that the second page will always be included.


Hope this helps!


Greetz


Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: FOP - page 2 not displayed when there is no overflow from page 1

Szeak (Register Man)
Hi,

An idea for this:
Define 3 kind of page-master for the three pages as:
     1. simple first page
     2. a page with page-before region with size like a page body, and
with 0 height of the page's body.
     3. simple third page (if different from first)

Use page-master-alternatives to exactly define the 3 kind of
page-master's order
Use fo:static-content for the second page

Best regards

Szeak

2017-11-29 12:45 ,Andreas Delmelle wrote:

> Hi
>
> Kind request/reminder:
> Please use fop-users@ for general usage questions. Thanks!
>
> Now that that is out of the way:
>
>> On 29 Nov 2017, at 06:59, gauravabburi <[hidden email]> wrote:
>>
>> I am trying to generate a PDF with multiple pages. I have a static page 2
>> which is to be generated even when there is no overflow from page 1.
>> However, that is not happening.
>> In case there is an overflow from page 1, I want it to be displayed in page
>> 3.
>> Page 1 -> "first"
>> Page 2 -> "terms"  - static page
>> Page 3 -> "rest"   -  overflow from Page 1
>> Code snippet :
> <snip />
>
> Off the top of my head, I would say that the most straightforward way to always force that second page would be to set the "force-page-count" attribute on the fo:page-sequence. See: https://www.w3.org/TR/xsl/#force-page-count
>
> A value of "even" or "end-on-even" should suffice to make it work, possibly in combination with an additional page-master for "blank" last pages if they are not the second.
> So, an unavoidable consequence of this approach is that this will generate an extra blank page at the end, if the content were to end on an odd page... If you can live with that, this should be enough to guarantee that the second page will always be included.
>
>
> Hope this helps!
>
>
> Greetz
>
>
> Andreas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: FOP - page 2 not displayed when there is no overflow from page 1

Szeak (Register Man)
Hi,

My previous answer was not good. Second page not generated, when first
page does not overflow.
So maybe the best solution is the two factor generation.

0. Generate the static content into Intermediate Format (in the
following: IF) once.
1. Generate the changing content as is into IF.
2. Merge IFs by insert the static content IF to second page position
3. Generate the output from the merged IF.

Bye Szeak


2017-11-30 10:14 ,Szeak (Register Man) wrote:

> Hi,
>
> An idea for this:
> Define 3 kind of page-master for the three pages as:
>     1. simple first page
>     2. a page with page-before region with size like a page body, and
> with 0 height of the page's body.
>     3. simple third page (if different from first)
>
> Use page-master-alternatives to exactly define the 3 kind of
> page-master's order
> Use fo:static-content for the second page
>
> Best regards
>
> Szeak
>
> 2017-11-29 12:45 ,Andreas Delmelle wrote:
>> Hi
>>
>> Kind request/reminder:
>> Please use fop-users@ for general usage questions. Thanks!
>>
>> Now that that is out of the way:
>>
>>> On 29 Nov 2017, at 06:59, gauravabburi <[hidden email]> wrote:
>>>
>>> I am trying to generate a PDF with multiple pages. I have a static
>>> page 2
>>> which is to be generated even when there is no overflow from page 1.
>>> However, that is not happening.
>>> In case there is an overflow from page 1, I want it to be displayed
>>> in page
>>> 3.
>>> Page 1 -> "first"
>>> Page 2 -> "terms"  - static page
>>> Page 3 -> "rest"   -  overflow from Page 1
>>> Code snippet :
>> <snip />
>>
>> Off the top of my head, I would say that the most straightforward way
>> to always force that second page would be to set the
>> "force-page-count" attribute on the fo:page-sequence. See:
>> https://www.w3.org/TR/xsl/#force-page-count
>>
>> A value of "even" or "end-on-even" should suffice to make it work,
>> possibly in combination with an additional page-master for "blank"
>> last pages if they are not the second.
>> So, an unavoidable consequence of this approach is that this will
>> generate an extra blank page at the end, if the content were to end
>> on an odd page... If you can live with that, this should be enough to
>> guarantee that the second page will always be included.
>>
>>
>> Hope this helps!
>>
>>
>> Greetz
>>
>>
>> Andreas
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]