Removing margins on title page

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Removing margins on title page

Post by Boreas »

Hello,

we are moving to dita 3.4 and are redoing our plugin for DDF customisation.

We had a first page with no margins, and a background image
And all other pages are with margins that are not equal all around.

the code we used in the basic-settings.xsl to achieve this was:

Code: Select all

....
	<xsl:variable name="page-width">8.5in</xsl:variable>
     <xsl:variable name="page-height">11in</xsl:variable>
 <!-- This is the default, but you can set the margins individually below. -->
	<xsl:variable name="page-margins">.5in</xsl:variable>
	<xsl:variable name="page-margins-front">0in</xsl:variable>
<!-- Change these if your page has different margins on different sides. -->
      	<xsl:variable name="page-margin-inside">.75in</xsl:variable>
	<xsl:variable name="page-margin-outside">.75in</xsl:variable>
  	<xsl:variable name="page-margin-top" >1.27cm</xsl:variable>
  	<xsl:variable name="page-margin-bottom">1.52cm</xsl:variable> 
	<xsl:variable name="body-margin">1in</xsl:variable>
  <!--Instructions to remove margins on title page-->
 	 <xsl:variable name="page-margin-inside-front">0in</xsl:variable>
  	<xsl:variable name="page-margin-outside-front">0in</xsl:variable>
 	 <xsl:variable name="page-margin-top-front">0in</xsl:variable>
 	 <xsl:variable name="page-margin-bottom-front"> 0in</xsl:variable>
   <!--The side column width is the amount the body text is indented relative to the margin. -->
   	 <xsl:variable name="side-col-width">5px</xsl:variable>
	<xsl:variable name="mirror-page-margins" select="false()"/>
	<xsl:variable name="default-font-size">11pt</xsl:variable>
    <xsl:variable name="default-line-height">120%</xsl:variable>
</xsl:stylesheet>
However this no longer works. I can get either the front page margins to 0 , or the margins for the rest of the document, but not both at the same time.....

I tried using this

Code: Select all

......
    	<xsl:variable name="page-width">8.5in</xsl:variable>
    	<xsl:variable name="page-height">11in</xsl:variable>
  	 <xsl:variable name="page-margin-inside" select="'0.75in'"></xsl:variable>
	<xsl:variable name="page-margin-outside" select="'0.75in'"></xsl:variable>
 	 <xsl:variable name="page-margin-top" select="'1.27cm'"></xsl:variable>
  	<xsl:variable name="page-margin-bottom" select="'1.52cm'"></xsl:variable>
   	 <xsl:variable name="body-margin">3in</xsl:variable>
  	<xsl:variable name="mirror-page-margins" select="true()" />
<!--Instructions for over page margins-->
    	<xsl:variable name="page-margin-inside-front" select="'0in'"></xsl:variable>
    	<xsl:variable name="page-margin-outside-front" select="'0in'"></xsl:variable>
    	<xsl:variable name="page-margin-top-front" select="'0in'"></xsl:variable> 
    	<xsl:variable name="page-margin-bottom-front" select="'0in'"></xsl:variable>
 	<xsl:variable name="default-font-size">11pt</xsl:variable>
    	<xsl:variable name="default-line-height">120%</xsl:variable>
    	<xsl:variable name="side-col-width">5px</xsl:variable>
   	 <xsl:variable name="generate-back-cover" select="true()"/>
</xsl:stylesheet>
but with no success,
Has anyone have an idea?

Kind regards
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Removing margins on title page

Post by Radu »

Hi,

How exactly do you customize the PDF publishing? PDF customization folder, PDF customization plugin or just make direct changes to the XSLTs?
Maybe you can look at how the "basic-settings.xsl" stylesheet looks like in the DITA OT 3.4:

DITA-OT3.4/plugins/org.dita.pdf2/cfg/fo/attrs/basic-settings.xsl

It does not seem to have any "page-margin-inside-front" variable, meaning that if you do add one it probably is not used.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Re: Removing margins on title page

Post by Boreas »

Hello Radu,
we use a PDF plugin.
Boreas
Posts: 86
Joined: Wed Feb 09, 2011 10:43 pm

Re: Removing margins on title page

Post by Boreas »

The Basic-settings file in 1.8.4 did not have the variables either.

The "basic-settings.xsl" stylesheet in DITA OT 1.8.4 did not have any "page-margin-inside-front" variable either....but it was working.

regards
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Removing margins on title page

Post by Radu »

Hi Carole,

I don't know, PDF customization problems are hard to figure out, if at some point you send us an email containing the PDF customization and some steps to reproduce the problem, I could try to look more into this.
My advice to you is that maybe you should consider switching to CSS as a means to style the PDF output, CSS is much easier to work with and understand.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply