Forum How do I...?

Prevent automatic page break when changing named page

ThePrintingSquirrel
At present, Prince automatically inserts a page break when the named page changes.

This is a stumbling point for me given the following scenario:

I have a PDF where some pages have bottom-floated, bleeding imagery. If that is the case I want to have no footer information (page number etc.).

The following code achieves this, but I get the automatic page break:
.pdf-float-bottom.pdf-bleed {
    page: pageNoFooterInfo;
}


Page "pageNoFooterInfo" then resets my string variables to zero.

Is there a way to suppress the automatic page break? I tried the usual CSS directives, but they have no effect. Or can I achieve the same outcome in a different way?

Thank you!
markbrown
Hi,

There's no way to suppress the page break, unfortunately. If an element's 'page' property doesn't have a name then it's supposed to be put on a non-named page, though I think you have provided a good use case for some alternate behaviour. For example, a "wildcard" value for the 'page' property that allows an element to continue on the current page without any page break.

For the time being, if you do an initial pass to determine page numbers then you might be able to get the desired outcome using the 'nth()' page selector, since these do not force page breaks to occur.

Mark
ThePrintingSquirrel
Hi @markbrown,

thank you for your reply. This topic brought me back to an earlier solution to my same question, but this no longer works as this footer is now more complicated - it has text in three page regions, all of which need to be "switched off".

I haven't looked into multiple passes yet, but will take note of that, thank you.

Yes, it would be awesome if you could add an easier solution for a future Prince version.

Thank you for this great software!