RTF is failing

2013-01-25 Thread markus.sticker.epos
Hi,

 

I just tried to generate a RTF using a very simple 
FO-File, but I got this

 

java.lang.NullPointerException 
at
org.apache.fop.render.rtf.RTFHandler.startPageSequence(RTFHandler.java:2
21) 
at
org.apache.fop.fo.pagination.PageSequence.startOfNode(PageSequence.java:
119) 
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder
.java:325) 
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175) 
at
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Transf
ormerIdentityImpl.java:1073) 
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source) 
at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown
Source) 
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source) 
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source) 
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source) 
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) 
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source) 
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:485) 
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300) 
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130) 
at org.apache.fop.cli.Main.startFOP(Main.java:177) 
at org.apache.fop.cli.Main.main(Main.java:208)

 

Do I have to do some more then setting the MineType to RTF?

Best Regards

 

Markus



RE: RTF is failing

2013-01-25 Thread Robert Meyer
Hi,

I tried to reproduce and found I was getting the following message before 
getting a nullpointer:

Only simple-page-masters are supported on page-sequences. Using default 
simple-page-master from page-sequence-master presentation. (See position 
19:76)

This is because for some reason it didn't like that I was using a page sequence 
master  e.g.

fo:simple-page-master master-name=test .../
fo:page-sequence-master master-name=testsequence
  fo:single-page-master-reference master-reference=test /
/fo:page-sequence-master
fo:page-sequence master-reference=testsequence ...
...
/fo:page-sequence

If I removed the page sequence from my FO to go into the RTF and instead did 
the following it worked fine:

fo:simple-page-master master-name=test .../
fo:page-sequence master-reference=test ...
...
/fo:page-sequence

At the moment I am not sure if this is a limitation, but it seems a bit odd 
that it cannot use simple page sequences so it warrants further investigation. 
There is a bug related to the same line in Jira found here:

https://issues.apache.org/jira/browse/FOP-2182

If you think your issue is not related to the page sequence master, it would 
help if you could post the example FO you are using. 

I will investigate more when I get the chance.

Best Regards,

Robert Meyer