Hello Peter,
I have what I think you describe, a background image stretching to the edges of
the recto and a non-empty verso (I have a copyright entry there). I include a
sanitized version below (pardon the namespace sloppiness, I have yet to clean
that up). I'm not sure why exactly yours does not work, but mine may give some
clues to things to try.
<xsl:template name="book.titlepage.recto">
<fo:block-container absolute-position="absolute"
width="{$page.width}"
height="{$page.height}"
top="-({$page.margin.top} + {$body.margin.top})"
left="-({$page.margin.inner})">
<fo:block>
<fo:table inline-progression-dimension="100%">
<xsl:attribute name="background-image"><xsl:value-of
select="$custom.image.path" />/images/cover_page_background.jpg</xsl:attribute>
<fo:table-column column-width="30.5mm"/>
<fo:table-column column-width="160mm"/>
<fo:table-column/>
<fo:table-body>
<fo:table-row height="100mm">
<fo:table-cell number-columns-spanned="3">
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block/>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="left" font-size="22pt">
<xsl:apply-templates mode="book.titlepage.recto.mode"
select="bookinfo/subtitle"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block/>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="left" font-family="sans-serif"
font-size="26pt">
<xsl:apply-templates mode="book.titlepage.recto.mode"
select="bookinfo/title"/>
</fo:block>
<fo:block text-align="left" font-family="sans-serif"
font-size="8pt">
Revision: <xsl:apply-templates
mode="book.titlepage.recto.mode"
select="bookinfo/revhistory/revision[1]/revnumber"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block/>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="30mm">
<fo:table-cell number-columns-spanned="3">
<fo:block/>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block-container>
</xsl:template>
Best of luck,
Best regards,
--
Erik Rask
Technical Information Architect
Procera Networks
________________________________________
From: Peter Desjardins <[email protected]>
Sent: Wednesday, January 11, 2017 6:50:52 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]