xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Bryant" <...@bryantcs.com>
Subject Re: word page break
Date Mon, 02 Apr 2007 22:31:00 GMT
Hi, Pardha,

I've done lots of work with WordML, so I can get you started on this one.

Insert -> Page Break produces the following element in Word's XML output (in the paragraph's
text run):

<w:br w:type="page"/>

When you do it from the paragraph properties, you get the following element (in the pPr element
for the paragraph):


So, to catch them both, you need corresponding templates, thus:

<xsl:template match="w:pageBreakBefore">
  <!-- Do whatever you do with page breaks here -->

<xsl:template match="w:br[@w:type='page']">
  <!-- Do whatever you do with page breaks here -->

If you do the same thing with the two kinds of breaks, you can process them in the same template,

<xsl:template match="w:pageBreakBefore|w:br[@w:type='page']">
  <!-- Do whatever you do with page breaks here -->


Jay Bryant
Bryant Communication Services

  ----- Original Message ----- 
  From: Pardha Paruchuri 
  To: fop-users@xmlgraphics.apache.org 
  Sent: Monday, April 02, 2007 12:56 PM
  Subject: word page break

  Hi All,

  I am using FOP 0.20.5 to convert a WordML document into PDF. As there are 2 types of pagebreaks
in word, one the hard/soft page break(from menu insert->page break) and two the pagebreakbefore
property on a paragraph(highlight a paragraph and right click to see properties), I see that
it is able to convert a pagebreakbefore but not the hard page break. I am just using a stylesheet
that microsoft recommends to convert WordML into XML-FO and I could not figure out where we
can make a change in the stylesheet to fix this issue. As I am new to XSL and understand that
this may not be a FOP problem but could someone give me a clue as to why it is not able to
convert a hard page break.


  Looking for earth-friendly autos? 
  Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. 
View raw message