NPE when using non-base14 font via IF XML

View: New views
9 Messages — Rating Filter:   Alert me  

NPE when using non-base14 font via IF XML

by Vincent Hennebert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

If I render the attached FO file into IF XML with the attached
configuration file, then render the xml file into PDF, then I get the
following error:
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.pdf.PDFPainter.getTypeface(PDFPainter.java:246)
        at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:269)
        at
org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:487)
        at
org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:277)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.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$FragmentContentDispatcher.dispatch(Unknown
Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
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(TransformerIdentityImpl.java:484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
        ... 3 more

To reproduce: put the config file at the root of a FOP local copy, then
run the following:
    fop -c config.xconf test.fo -if if.xml
    fop -c config.xconf -ifin if.xml test.pdf

Did I miss anything?

Thanks,
Vincent

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="page"
      page-height="220pt" page-width="320pt" margin="10pt">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="page" language="en" country="GB">
    <fo:flow flow-name="xsl-region-body" hyphenate="true" text-align="justify" font-family="DejaVu">
      <fo:block>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL
        formatting objects (XSL-FO) and an output independent formatter. It is a Java application
        that reads a formatting object (FO) tree and renders the resulting pages to a specified
        output.</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
  <use-cache>false</use-cache>
  <font-base>test/resources/fonts/</font-base>
  <renderers>
    <renderer mime="application/pdf">
      <filterList>
        <value>null</value>
      </filterList>
      <filterList type="image">
        <value>flate</value>
        <value>ascii-85</value>
      </filterList>
      <fonts>
        <font embed-url="DejaVuLGCSerif.ttf">
          <font-triplet name="DejaVu" style="normal" weight="normal"/>
        </font>
      </fonts>
    </renderer>
    <renderer mime="application/X-fop-intermediate-format">
      <fonts>
        <font embed-url="DejaVuLGCSerif.ttf">
          <font-triplet name="DejaVu" style="normal" weight="normal"/>
        </font>
      </fonts>
    </renderer>
  </renderers>
</fop>

Mimic a specific output with the intermediate format [was: Re: NPE when using non-base14 font via IF XML]

by Vincent Hennebert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

While I'm at it, and taking the same FO file and config file: specifying
a mime type for the intermediate format doesn’t seem to work, contrary
to the area tree. Take the config file, remove the part corresponding to
the intermediate format (<renderer
mime="application/X-fop-intermediate-format"), and run the following:

    fop -c config.xconf test.fo -at application/pdf at.xml
    fop -c config.xconf -atin at.xml test.pdf

That works and the font is correctly embedded. Now run the following:

    fop -c config.xconf test.fo -if application/pdf if.xml

You get the following warning:
WARNING: Font "DejaVu,normal,400" not found. Substituting with "any,normal,400".

Hence my adding of the IF part in the config file.

Is that normal? Isn’t there an output mimiced by default? Did I miss
anything again?

Thanks,
Vincent

Re: NPE when using non-base14 font via IF XML

by Alexander Kiel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Vincent,

> To reproduce: put the config file at the root of a FOP local copy, then
> run the following:
>     fop -c config.xconf test.fo -if if.xml
>     fop -c config.xconf -ifin if.xml test.pdf

I would like to run your example this way, but there is no fop.sh. Is
there such a thing for the Linux guys or should I write one?

Best Regards
Alex



signature.asc (204 bytes) Download Attachment

Re: NPE when using non-base14 font via IF XML

by Vincent Hennebert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Alexander,

Alexander Kiel wrote:
> Hi Vincent,
>
>> To reproduce: put the config file at the root of a FOP local copy, then
>> run the following:
>>     fop -c config.xconf test.fo -if if.xml
>>     fop -c config.xconf -ifin if.xml test.pdf
>
> I would like to run your example this way, but there is no fop.sh. Is
> there such a thing for the Linux guys or should I write one?

The script is called just fop. Look at the root of the project, it’s
actually a shell script.
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop?view=log


> Best Regards
> Alex

Vincent

Re: NPE when using non-base14 font via IF XML

by Alexander Kiel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Vincent,

> The script is called just fop. Look at the root of the project, it’s
> actually a shell script.
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop?view=log

oh I was just blind.

Thanks.

Alex



signature.asc (204 bytes) Download Attachment

Re: NPE when using non-base14 font via IF XML

by Alexander Kiel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Vincent,

I get a completely different error. If I ran

   fop -c config.xconf test.fo -if if.xml

There is no output - so it seems to run fine.

If I run

    fop -c config.xconf -ifin if.xml test.pdf

afterwards, I get:

[Fatal Error] if.xml:4:12: The prefix "x" for element "x:xmpmeta" is not
bound.
Oct 7, 2009 2:37:23 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
The prefix "x" for element "x:xmpmeta" is not bound.
        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)

---------

javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
The prefix "x" for element "x:xmpmeta" is not bound.
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:469)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
        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: org.xml.sax.SAXParseException: The prefix "x" for element
"x:xmpmeta" is not bound.
        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(TransformerIdentityImpl.java:452)
        ... 4 more
---------
org.xml.sax.SAXParseException: The prefix "x" for element "x:xmpmeta" is
not bound.
        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(TransformerIdentityImpl.java:452)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
        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)

I attached the if.xml. There is indeed no namespace declared for the "x"
prefix.

I'm inside a up-to-date trunk. FOP was build with Java 1.4.

Best Regards
Alex

-  
e-mail: alexanderkiel@...
web:    www.alexanderkiel.net


On Wed, 2009-10-07 at 12:16 +0100, Vincent Hennebert wrote:

> Hi,
>
> If I render the attached FO file into IF XML with the attached
> configuration file, then render the xml file into PDF, then I get the
> following error:
> 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.pdf.PDFPainter.getTypeface(PDFPainter.java:246)
> at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:269)
> at
> org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:487)
> at
> org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:277)
> at
> org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.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$FragmentContentDispatcher.dispatch(Unknown
> Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> 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(TransformerIdentityImpl.java:484)
> at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> ... 3 more
>
> To reproduce: put the config file at the root of a FOP local copy, then
> run the following:
>     fop -c config.xconf test.fo -if if.xml
>     fop -c config.xconf -ifin if.xml test.pdf
>
> Did I miss anything?
>
> Thanks,
> Vincent



if.xml (2K) Download Attachment
signature.asc (204 bytes) Download Attachment

Re: NPE when using non-base14 font via IF XML

by Jeremias Maerki-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander, that hints to a buggy XSLT processor. Please replace the
Xalan coming with the JVM with the one bundled with FOP.
http://xml.apache.org/xalan-j/faq.html#faq-N100EF

On 07.10.2009 14:42:52 Alexander Kiel wrote:

> Hi Vincent,
>
> I get a completely different error. If I ran
>
>    fop -c config.xconf test.fo -if if.xml
>
> There is no output - so it seems to run fine.
>
> If I run
>
>     fop -c config.xconf -ifin if.xml test.pdf
>
> afterwards, I get:
>
> [Fatal Error] if.xml:4:12: The prefix "x" for element "x:xmpmeta" is not
> bound.
> Oct 7, 2009 2:37:23 PM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> The prefix "x" for element "x:xmpmeta" is not bound.
> 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)
>
> ---------
>
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> The prefix "x" for element "x:xmpmeta" is not bound.
> at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:469)
> at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> 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: org.xml.sax.SAXParseException: The prefix "x" for element
> "x:xmpmeta" is not bound.
> 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(TransformerIdentityImpl.java:452)
> ... 4 more
> ---------
> org.xml.sax.SAXParseException: The prefix "x" for element "x:xmpmeta" is
> not bound.
> 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(TransformerIdentityImpl.java:452)
> at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> 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)
>
> I attached the if.xml. There is indeed no namespace declared for the "x"
> prefix.
>
> I'm inside a up-to-date trunk. FOP was build with Java 1.4.
>
> Best Regards
> Alex
>
> -  
> e-mail: alexanderkiel@...
> web:    www.alexanderkiel.net
>
>
> On Wed, 2009-10-07 at 12:16 +0100, Vincent Hennebert wrote:
> > Hi,
> >
> > If I render the attached FO file into IF XML with the attached
> > configuration file, then render the xml file into PDF, then I get the
> > following error:
> > 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.pdf.PDFPainter.getTypeface(PDFPainter.java:246)
> > at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:269)
> > at
> > org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:487)
> > at
> > org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:277)
> > at
> > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.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$FragmentContentDispatcher.dispatch(Unknown
> > Source)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> > 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(TransformerIdentityImpl.java:484)
> > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> > ... 3 more
> >
> > To reproduce: put the config file at the root of a FOP local copy, then
> > run the following:
> >     fop -c config.xconf test.fo -if if.xml
> >     fop -c config.xconf -ifin if.xml test.pdf
> >
> > Did I miss anything?
> >
> > Thanks,
> > Vincent




Jeremias Maerki


Re: NPE when using non-base14 font via IF XML

by Alexander Kiel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeremias,

> Alexander, that hints to a buggy XSLT processor. Please replace the
> Xalan coming with the JVM with the one bundled with FOP.
> http://xml.apache.org/xalan-j/faq.html#faq-N100EF

Thanks for this hint. I just use Java 1.4 not very often. With Java 1.6
it works.

Now I see the same NullPointerException. This null fontName comes from
line 264 in PDFPainter:

    String fontKey = getFontInfo().getInternalFontKey(triplet);

The JavaDoc of getInternalFontKey() says, it can return null. But there
is no null check afterwards. But I have no idea, why the triplet is
unknown.

Best Regards
Alex

>
> On 07.10.2009 14:42:52 Alexander Kiel wrote:
> > Hi Vincent,
> >
> > I get a completely different error. If I ran
> >
> >    fop -c config.xconf test.fo -if if.xml
> >
> > There is no output - so it seems to run fine.
> >
> > If I run
> >
> >     fop -c config.xconf -ifin if.xml test.pdf
> >
> > afterwards, I get:
> >
> > [Fatal Error] if.xml:4:12: The prefix "x" for element "x:xmpmeta" is not
> > bound.
> > Oct 7, 2009 2:37:23 PM org.apache.fop.cli.Main startFOP
> > SEVERE: Exception
> > javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> > The prefix "x" for element "x:xmpmeta" is not bound.
> > 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)
> >
> > ---------
> >
> > javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> > The prefix "x" for element "x:xmpmeta" is not bound.
> > at
> > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:469)
> > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> > 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: org.xml.sax.SAXParseException: The prefix "x" for element
> > "x:xmpmeta" is not bound.
> > 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(TransformerIdentityImpl.java:452)
> > ... 4 more
> > ---------
> > org.xml.sax.SAXParseException: The prefix "x" for element "x:xmpmeta" is
> > not bound.
> > 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(TransformerIdentityImpl.java:452)
> > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> > 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)
> >
> > I attached the if.xml. There is indeed no namespace declared for the "x"
> > prefix.
> >
> > I'm inside a up-to-date trunk. FOP was build with Java 1.4.
> >
> > Best Regards
> > Alex
> >
> > -  
> > e-mail: alexanderkiel@...
> > web:    www.alexanderkiel.net
> >
> >
> > On Wed, 2009-10-07 at 12:16 +0100, Vincent Hennebert wrote:
> > > Hi,
> > >
> > > If I render the attached FO file into IF XML with the attached
> > > configuration file, then render the xml file into PDF, then I get the
> > > following error:
> > > 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.pdf.PDFPainter.getTypeface(PDFPainter.java:246)
> > > at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:269)
> > > at
> > > org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:487)
> > > at
> > > org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:277)
> > > at
> > > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.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$FragmentContentDispatcher.dispatch(Unknown
> > > Source)
> > > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> > > 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(TransformerIdentityImpl.java:484)
> > > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:236)
> > > ... 3 more
> > >
> > > To reproduce: put the config file at the root of a FOP local copy, then
> > > run the following:
> > >     fop -c config.xconf test.fo -if if.xml
> > >     fop -c config.xconf -ifin if.xml test.pdf
> > >
> > > Did I miss anything?
> > >
> > > Thanks,
> > > Vincent
>
>
>
>
> Jeremias Maerki
>
>


signature.asc (204 bytes) Download Attachment

Re: Mimic a specific output with the intermediate format [was: Re: NPE when using non-base14 font via IF XML]

by Jeremias Maerki-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vincent,
the "-if [mime] out" pattern wasn't implemented for the command-line.
But I've just done that missing piece:
http://svn.apache.org/viewvc?rev=822753&view=rev

On 07.10.2009 13:27:57 Vincent Hennebert wrote:

> While I'm at it, and taking the same FO file and config file: specifying
> a mime type for the intermediate format doesn’t seem to work, contrary
> to the area tree. Take the config file, remove the part corresponding to
> the intermediate format (<renderer
> mime="application/X-fop-intermediate-format"), and run the following:
>
>     fop -c config.xconf test.fo -at application/pdf at.xml
>     fop -c config.xconf -atin at.xml test.pdf
>
> That works and the font is correctly embedded. Now run the following:
>
>     fop -c config.xconf test.fo -if application/pdf if.xml
>
> You get the following warning:
> WARNING: Font "DejaVu,normal,400" not found. Substituting with "any,normal,400".
>
> Hence my adding of the IF part in the config file.
>
> Is that normal? Isn’t there an output mimiced by default? Did I miss
> anything again?
>
> Thanks,
> Vincent




Jeremias Maerki