Page 1 of 1

Blank PDF title page

Posted: Tue Nov 01, 2011 6:45 pm
by Boreas
Hello,

When I generate a PDF from a Dita map, the title page is blank.
What puzzles me is that just a few days ago it was generating properly.
We customized the front-matter-attr.xsl to format layout and image appearing on title page.
The ditamap attributes are the same and the image we use on the title page is still there.
Any ideas where to look for?

thanks

Carole

Re: Blank PDF title page

Posted: Wed Nov 02, 2011 12:41 pm
by Radu
Hi Carole,

If the title is still specified in the DITA Map (as the @title attribute or as the <title> element) then you probably also made some changes to the OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/front-matter_1.0.xsl stylesheet in the XSLT template called:

<xsl:template name="createFrontMatter_1.0">

which matches the title of a DITA Map or Bookmap and creates a block element for it.

Another useful way to debug would be to edit the Oxygen PDF transformation scenario and set in the Parameters tab the value of the retain.topic.fo parameter to yes.

After the transformation, in the output directory you should find a topic.fo file containing the XSL-FO content which was used to create the PDF. Does the title appear in the FO file? If so, maybe you have set on the block some attributes which remove it from the PDF file (like a very small @height attribute for example).

Regards,
Radu

Re: Blank PDF title page

Posted: Wed Nov 02, 2011 5:57 pm
by Boreas
Hello Radu,

Yup, the title is in the FO file. We added 2 images on front page, and displayed the revision number and an underline. The FO file does not contain the revision number. But I cannot find any attribute that could cause the problem.
I commented out what we added but the title does not display in the PDF.

Thanks


<xsl:otherwise>
<fo:page-sequence master-reference="front-matter" xsl:use-attribute-sets="__force__page__count">
<xsl:call-template name="insertFrontMatterStaticContents"/>
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="__frontmatter">
<!-- set the logo -->
<fo:block text-align="right" margin-right="-25px" margin-top="-35px">
<fo:external-graphic src="url({concat($artworkPrefix, '/Customization/OpenTopic/common/artwork/logo_nobel_cmyk.svg')})"/>
</fo:block>

<!-- set the sciencesphere -->
<fo:block text-align="center" margin-top="375px">
<fo:external-graphic src="url({concat($artworkPrefix, '/Customization/OpenTopic/common/artwork/NB_Sciencesphere_GREY100dpi.png')})"/>
</fo:block>

<!-- set the title-->
<fo:block xsl:use-attribute-sets="__frontmatter__title">
<xsl:choose>
<xsl:when test="//*[contains(@class,' bkinfo/bkinfo ')][1]">
<xsl:apply-templates select="//*[contains(@class,' bkinfo/bkinfo ')][1]/*[contains(@class,' topic/title ')]/node()"/>
</xsl:when>
<xsl:when test="//*[contains(@class, ' map/map ')]/@title">
<xsl:value-of select="//*[contains(@class, ' map/map ')]/@title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/descendant::*[contains(@class, ' topic/topic ')][1]/*[contains(@class, ' topic/title ')]"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<!-- set the title underline -->
<fo:block xsl:use-attribute-sets="__frontmatter__title_underline">
</fo:block>
<!-- set the revision # -->
<fo:block xsl:use-attribute-sets="__frontmatter__revision">
<xsl:value-of select="//*[contains(@class, ' map/map ')]/@rev"/>
</fo:block>


<!-- set the subtitle -->
<xsl:apply-templates select="//*[contains(@class,' bkinfo/bkinfo ')][1]/*[contains(@class,' bkinfo/bktitlealts ')]/*[contains(@class,' bkinfo/bksubtitle ')]"/>

<fo:block xsl:use-attribute-sets="__frontmatter__owner">
<xsl:choose>
<xsl:when test="//*[contains(@class,' bkinfo/bkowner ')]">
<xsl:apply-templates select="//*[contains(@class,' bkinfo/bkowner ')]"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$map/*[contains(@class, ' map/topicmeta ')]"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>

Re: Blank PDF title page

Posted: Wed Nov 02, 2011 8:17 pm
by Boreas
found it!

I implemented the changes under <xsl:template name="createFrontMatter"> and not under <xsl:template name="createFrontMatter_1.0">.

My mistake :oops:

Sorry for the troubble.

Thanks

Re: Blank PDF title page

Posted: Thu Nov 03, 2011 11:18 am
by Radu
Hi Carole,

No worries.
Found myself doing this mistake quite often, I usually placed an xsl:message just to know the template which was actually used, the DITA OT stylesheets probably need a good clean up.

Regards,
Radu