xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Martin.E...@asmorphic.net.au>
Subject Issue with fonts and Intermediate Format
Date Sat, 06 Feb 2010 02:02:01 GMT
Hi Guys,

Time for my normal once yearly issue with fonts.. 

I'm trying to get postscript working for me, and have noticed an anomaly I'm
struggling to work around. I'm currently using a TrueType font, and have
tried the same with a Type1 font to no avail. 

When I go from FO -> PS - Everything works fine, it picks up my 'Verdana'
font without a problem.

When I go from FO -> IF -> PS - I get a java exception (fontName must not be
null) in the IF -> PS Phase.

My command line arguments are as follows;

FO -> PS
C:\dev\workspace_java\FOP\fop.bat -c
C:\dev\workspace_java\FOP\conf\fop.xconf c:\dev\clients\xx\test.fo -ps
test.ps

FO -> IF
C:\dev\workspace_java\FOP\fop.bat -c
C:\dev\workspace_java\FOP\conf\fop.xconf C:\dev\Clients\xx\test.fo -if
"application/postscript" c:\dev\clients\xx\test.if

IF -> PS
C:\dev\workspace_java\FOP\fop.bat -c
C:\dev\workspace_java\FOP\conf\fop.xconf  -ifin c:\dev\clients\xx\test.if
-ps test.ps

The test.fo is mostly empty other than:
	 <fo:block font-family="Verdana">
		Test
	 </fo:block>

In the fop.xconf - I have:


<renderer mime="application/postscript">
 	<optimize-resources>true</optimize-resources>
	<fonts>
		<directory>C:\dev\pdfbin\fonts</directory>
	</fonts>
</renderer>
<renderer mime="application/X-fop-intermediate-format">
	<fonts>
		<directory>c:\dev\pdfbin\fonts\</directory>
	</fonts>
</renderer>

I suspect it's not the font, as a direct convert works fine. 

Any ideas? 

Thanks
Martin

Exception for your info looked like;
C:\dev\Clients\DomainAir>C:\dev\workspace_java\FOP\fop.bat -c
C:\dev\workspace_java\FOP\conf\fop.xconf  -ifin
c:\dev\clients\DomainAir\test.if -ps test.ps
06/02/2010 12:55:30 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 297mm
06/02/2010 12:55:30 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 210mm
06/02/2010 12:55:30 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.NullPointerException: fontName must not be null
        at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:239)
        at
org.apache.fop.cli.IFInputHandler.renderTo(IFInputHandler.java:77)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: java.lang.NullPointerException: fontName must not be null
        at
org.apache.fop.render.ps.PSPainter.getTypeface(PSPainter.java:262)
        at org.apache.fop.render.ps.PSPainter.drawText(PSPainter.java:355)
        at
org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(I
FParser.java:487)
        at
org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java
:277)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerI
dentityImpl.java:1101)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
        at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message