Page 1 of 1

PDF Customization Without Front Matter

Posted: Tue Jul 01, 2014 11:52 pm
by mharvey
Hi,

I would like to create a new PDF customization for short documents that do not require a cover page and a TOC.

What I had in mind was to use a DITA bookmap with a single chapter, using a slightly modified header and the minitoc as the front page; the rest of the document would be only the body, without any appendices, index or glossary.

I tried to remove the front matter page masters and page sequences from the layout-masters.xsl file, but I got hard-to-trace errors from the FOP processor.

Is there a better way to do this ? Otherwise, which file do I need to update, in addition to the layout-master.xsl file ?

Thanks a lot in advance for your help !

Mathieu

Re: PDF Customization Without Front Matter

Posted: Fri Jul 04, 2014 4:24 pm
by sorin_ristache
Hi Mathieu,

You started off in the right direction, you just need to follow through with all unneeded fo:simple-page-master and fo:page-sequence elements, and most importantly be consistent about it: one simple page master must be removed/commented out together with all page sequences that refer to it. Just do a Find in Files (Ctrl+ALt+H in Oxygen) on directory OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2 and comment out:
  • all fo:simple-page-master elements except for the ones with a name like body-*
  • all calls to the "generate-page-sequence-master" template (as in <xsl:call-template name="generate-page-sequence-master">) except for the ones with a master-name parameter like body-* and ditamap-body-*
  • all fo:page-sequence elements except for the ones with a master-reference attribute like body- and the ones with a master-reference attribute as a variable name, like {$page-sequence-reference}
So only the body page masters and body page sequences will remain. This recipe works for both maps (a <map> root element) and bookmaps (a <bookmap> root element), I just tested it. Please let us know if you still get obscure (as in hard-to-trace) errors.


Regards,
Sorin

Re: PDF Customization Without Front Matter

Posted: Fri Jul 04, 2014 5:00 pm
by mharvey
Thanks Sorin !

I'll try this out as soon as possible and will keep you posted.