I fixed that problem with the advice here, thanks! The attribute that
positioned the block-container correctly was absolute-position=fixed.
<xsl:template name="book.titlepage.recto">
<xsl:element name="fo:block-container">
<xsl:attribute name="absolute-position">fixed</xsl:attribute>
<xsl:attribute name="width">8.5in</xsl:attribute> <!-- my page
is 8.5x11 inches -->
<xsl:attribute name="height">11in</xsl:attribute>
<xsl:attribute name="background-color">#ff4c00</xsl:attribute>
[page contents omittted]
</xsl:element>
</xsl:template>
I removed the negative margin-left and margin-top attributes that I
had been using. Those were compensating for the page.margin.top and
page.margin.inner attributes.
I appreciate the help, the cover's looking great!
Peter
On Thu, Jan 19, 2017 at 11:34 AM, Peter Desjardins
<[email protected]> wrote:
> Thanks, Erik and Bob! Trying these solutions, really appreciate the advice.
>
> Peter
>
> On Thu, Jan 19, 2017 at 4:39 AM, Erik Rask
> <[email protected]> wrote:
>> Peter,
>> A few more things that I remember having to tweak when I set up the cover
>> pages:
>> You may need to look at the page margin values (there's an excellent
>> illustration on
>> http://www.sagehill.net/docbookxsl/PrintOutput.html).
>>
>> I have explicit settings for the following ones:
>>
>> region.before.extent
>> header.table.height
>> body.margin.top
>> page.margin.top
>> region.after.extent
>> footer.table.height
>> body.margin.bottom
>> page.margin.bottom
>> page.margin.inner
>> page.margin.outer
>>
>> Also, in the title page XML (which is transformed into a titlepage XSL by
>> processing it with the docbook titlepage.xsl and then included in the
>> customization
>> stylesheet) there are things to consider,
>> e.g:
>>
>> <t:titlepage-separator>
>> <fo:block break-after="page"/>
>> </t:titlepage-separator>
>>
>> <t:titlepage-before t:side="verso">
>> <fo:block break-after="page"/>
>> </t:titlepage-before>
>>
>> Hope this helps,
>> BR /Erik R.
>> ________________________________________
>> From: Peter Desjardins <[email protected]>
>> Sent: Wednesday, January 11, 2017 6:50 PM
>> To: DocBook Apps
>> Subject: [docbook-apps] PDF recto title page customization adds blank page
>> before the verso title page
>>
>> Hi. I want the cover page of my book PDF to have a full-bleed color
>> background so I added a fo:block-container that's the same size as the
>> page and gave it the background-color attribute. This works well and
>> the cover page looks great, but it also introduces a blank page
>> between the recto title page and the verso title page.
>>
>> It seems that there's something about the recto title page that is
>> spilling over into a new page but doesn't appear there at all.
>>
>> Has anyone else tried to do something like this? I found that I had to
>> set negative margins of the block-container above and to the left of
>> the page in order to center the colored background over the first
>> page.
>>
>> I feel like I'm grasping at straws and really should understand what's
>> going on much more clearly.
>>
>> Here's my customization for the book title page:
>>
>> <xsl:template name="book.titlepage.recto">
>> <xsl:element name="fo:block-container">
>> <xsl:attribute name="width">8.5in</xsl:attribute>
>> <xsl:attribute name="height">11in</xsl:attribute>
>> <xsl:attribute name="margin-left">-1.25in</xsl:attribute>
>> <xsl:attribute name="margin-top">-0.75in</xsl:attribute>
>> <xsl:attribute name="background-color">#ff4c00</xsl:attribute>
>> <xsl:element name="fo:block">
>> <xsl:attribute name="margin-top">6in</xsl:attribute>
>> <xsl:attribute name="margin-left">2in</xsl:attribute>
>> <xsl:element name ="fo:external-graphic">
>> <xsl:attribute name="content-width">2in</xsl:attribute>
>> <xsl:attribute name="src">
>> <xsl:text>url(mylogo.svg)</xsl:text>
>> </xsl:attribute>
>> </xsl:element>
>> </xsl:element>
>> <xsl:element name="fo:block-container">
>> <xsl:attribute name="margin-top">.2in</xsl:attribute>
>> <xsl:attribute name="margin-left">.35in</xsl:attribute>
>> <xsl:element name="fo:block">
>> <xsl:attribute name="color">#ffffff</xsl:attribute>
>> <xsl:attribute name="text-align">left</xsl:attribute>
>> <xsl:attribute name="font-size">22pt</xsl:attribute>
>> <xsl:attribute name="font-family">sans-serif</xsl:attribute>
>> <xsl:attribute name="font-weight">400</xsl:attribute>
>> <xsl:value-of select="//d:book/d:info/d:title" />
>> </xsl:element>
>> </xsl:element>
>> </xsl:element>
>> </xsl:template>
>>
>>
>> Thanks!
>>
>> Peter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]