Forum How do I...?

Make first page a left page?

feklee
Is it possible to make page number 1 a left page?

(I could swap things in CSS, but that's confusing)
mikeday
Not at the moment, no. We may add a new CSS property for this in the future.
feklee
Thanks for clarification!
adriencater
Just ran into this problem as well – it's not show-stopping, but control over this would be nice.

A --first-page=left command line option would be useful. A CSS hook to control things would be even better.

something in the spirit of:
@page:first { page-position: left; }


One detail about implementation to keep in mind would be the relationship to page *numbers*: odd or even. In my situation, I'm outputting a subset of a larger document, basically a two-page spread. The (first) left-hand page is properly numbered 8 (because I used counter-reset: page 8;) which would logically imply that it's a left-hand page. So perhaps there needs to be a second way to approach this, something in the spirit of

@page:even { page-position: left; }
@page:odd { page-position: right; }





mikeday
Funny thing is we have a pdf-page-layout property used to control how the PDF is viewed in Acrobat, eg.
@prince-pdf {
    prince-pdf-page-layout: single-page | one-column | two-column-left | two-column-right
}

Technically specifying two-column-left or two-column-right is already giving us enough information to decide whether the first page is a left or right page, but we don't currently take advantage of that.
adriencater
I was also playing around that that property to see if it had an influence on the page positions :)

But, I might be wary about how those are linked!

Specifying whether a page is on the left or right side of a layout influences things like float: inside|outside; and margin:inside|outside; which change the actual layout of elements on those pages.

The pdf-page-layout is only (if I understand correctly) an indication to the PDF display software for how that document should be displayed, and these may be ignored, irrelevant, or changed by the user.

Since it might be "bad" to have actual content layout shifting around because of a pdf display preference, I would suggest that, if there's a direct or inferred link between these two aspects, that the pdf-display follow under the influence of the page-position: left|right; property, rather than the other way around!
mikeday
Yes, I was thinking the same thing. It would be better to have a higher-level property that determines both.
adriencater
I could see page-position (influencing layout of inside/outside properties) having an influence over pdf-page-layout commands give to the PDF display software for presentation, but definitely not the other way around. If pdf-page-layout continues to exist, and a page-position property is introduced, there can be fine grained control and overrides between the two as necessary.

Also, I can imagine scenarios where a user might want to specifically shift a page in a document to 'force' left or right side layout, possibly multiple times - and have the possibly or not reflected in the PDF display software.
mikeday
We have now released Prince 10 rev 5, which allows you to control the first page by applying "page-break-before: left", a simple solution which I can't believe escaped my notice. :)
jim_albright
I will be using this. Thank you.

Jim Albright
Wycliffe Bible Translators