Re: What is the status of fop ?

2010-01-27 Thread Pascal Sancho
Hi Mathieu,

PNG is supported by FOP (see [1] for further information)

Reading your log, there is something wrong in your XSL-FO:
WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)

vs. root (http://www.w3.org/1999/XSL/Format)

You should have a look into that direction.
That is confirmed by the rest of the error message, thrown during the Xalan 
stage.

[1] http://xmlgraphics.apache.org/fop/0.95/graphics.html#png

Pascal

Mathieu Malaterre a écrit :
 Hi there,

   I am currently trying to check if my group can start using docbook
 for writing high quality documentation. As far as I understand there
 are three competitors dblatex, xmlroff and fop. dblatex is a strange
 beast as it 'just works', but you cannot control anything (PNG file
 are degraded).

 I am now trying fop on my debian system:

 $ fop  -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
 -pdf article.pdf -xml in.xml

 which returns the following error (*).

 The input example was simply:

 $ cat in.xml
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
   articleinfo
 titletitle/title
 author
   firstnameauthor/firstname
   surnameauthor2/surname
   affiliation
 orgnamebla/orgname
   /affiliation
 /author
 pubdate2001/pubdate
   /articleinfo
   section
 titlesection 1/title
 paratext section 1/para
 figure
   titlefirst/title
   mediaobject
 imageobject
   imagedata fileref=graphics2.png/
 /imageobject
   /mediaobject
 /figure
   /section
 /article


 Could someone please confirm whether including PNG file is supported or not ?

 Thanks,
 --
 Mathieu
 Ps: I haven't yet tried xmlroff

 (*)
 Jan 27, 2010 3:02:25 PM org.apache.fop.cli.InputHandler warning
 WARNING: javax.xml.transform.TransformerException: Making portrait
 pages on USletter paper (8.5inx11in)
 Jan 27, 2010 3:02:25 PM org.apache.fop.cli.InputHandler warning
 WARNING: javax.xml.transform.TransformerException: Read
 /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
 Jan 27, 2010 3:02:26 PM org.apache.fop.hyphenation.Hyphenator 
 getHyphenationTree
 SEVERE: Couldn't find hyphenation pattern en
 Jan 27, 2010 3:02:26 PM org.apache.fop.fo.FOTreeBuilder$MainFOHandler 
 endElement
 WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)
 vs. root (http://www.w3.org/1999/XSL/Format)
 Jan 27, 2010 3:02:26 PM org.apache.fop.fo.FOTreeBuilder fatalError
 SEVERE: javax.xml.transform.TransformerException: 
 java.lang.NullPointerException
 Jan 27, 2010 3:02:26 PM org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 javax.xml.transform.TransformerException: java.lang.NullPointerException
 at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
 at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
 at org.apache.fop.cli.Main.startFOP(Main.java:166)
 at org.apache.fop.cli.Main.main(Main.java:197)

 -

 ; SystemID: file:/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl;
 Line#: 223; Column#: 59
 javax.xml.transform.TransformerException: java.lang.NullPointerException
 at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)
 at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
 at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
 at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
 at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
 at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
 at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
 at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
 at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
 at 
 org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
 at 
 org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)
 at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
 at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
 at org.apache.fop.cli.Main.startFOP(Main.java:166)
 at org.apache.fop.cli.Main.main(Main.java:197)
 Caused by: java.lang.NullPointerException
 at org.apache.fop.render.pdf.FopPDFImage.setup(FopPDFImage.java:144)
 at 

Re: What is the status of fop ?

2010-01-27 Thread Mathieu Malaterre
Thanks for the hint this is indeed reported in the FAQ:

http://xmlgraphics.apache.org/fop/faq.html#saxexception-mismatch

However I am already using the latest of xalan:

$ apt-cache policy libxalan2-java
libxalan2-java:
  Installed: 2.7.1-5
  Candidate: 2.7.1-5
  Version table:
 *** 2.7.1-5 0
200 http://ftp.fr.debian.org testing/main Packages
100 http://ftp.fr.debian.org unstable/main Packages
100 /var/lib/dpkg/status
 2.7.1-2 0
500 http://ftp.fr.debian.org lenny/main Packages


Is there anything else I should be looking at ?

Thanks again

On Wed, Jan 27, 2010 at 3:21 PM, Pascal Sancho pascal.san...@takoma.fr wrote:
 Hi Mathieu,

 PNG is supported by FOP (see [1] for further information)

 Reading your log, there is something wrong in your XSL-FO:
 WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)

 vs. root (http://www.w3.org/1999/XSL/Format)

 You should have a look into that direction.
 That is confirmed by the rest of the error message, thrown during the Xalan 
 stage.

 [1] http://xmlgraphics.apache.org/fop/0.95/graphics.html#png

 Pascal

 Mathieu Malaterre a écrit :
 Hi there,

   I am currently trying to check if my group can start using docbook
 for writing high quality documentation. As far as I understand there
 are three competitors dblatex, xmlroff and fop. dblatex is a strange
 beast as it 'just works', but you cannot control anything (PNG file
 are degraded).

 I am now trying fop on my debian system:

 $ fop  -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
 -pdf article.pdf -xml in.xml

 which returns the following error (*).

 The input example was simply:

 $ cat in.xml
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
   articleinfo
     titletitle/title
     author
       firstnameauthor/firstname
       surnameauthor2/surname
       affiliation
         orgnamebla/orgname
       /affiliation
     /author
     pubdate2001/pubdate
   /articleinfo
   section
     titlesection 1/title
     paratext section 1/para
     figure
       titlefirst/title
       mediaobject
         imageobject
           imagedata fileref=graphics2.png/
         /imageobject
       /mediaobject
     /figure
   /section
 /article


 Could someone please confirm whether including PNG file is supported or not ?

 Thanks,
 --
 Mathieu
 Ps: I haven't yet tried xmlroff

 (*)
 Jan 27, 2010 3:02:25 PM org.apache.fop.cli.InputHandler warning
 WARNING: javax.xml.transform.TransformerException: Making portrait
 pages on USletter paper (8.5inx11in)
 Jan 27, 2010 3:02:25 PM org.apache.fop.cli.InputHandler warning
 WARNING: javax.xml.transform.TransformerException: Read
 /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
 Jan 27, 2010 3:02:26 PM org.apache.fop.hyphenation.Hyphenator 
 getHyphenationTree
 SEVERE: Couldn't find hyphenation pattern en
 Jan 27, 2010 3:02:26 PM org.apache.fop.fo.FOTreeBuilder$MainFOHandler 
 endElement
 WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)
 vs. root (http://www.w3.org/1999/XSL/Format)
 Jan 27, 2010 3:02:26 PM org.apache.fop.fo.FOTreeBuilder fatalError
 SEVERE: javax.xml.transform.TransformerException: 
 java.lang.NullPointerException
 Jan 27, 2010 3:02:26 PM org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
         at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
         at org.apache.fop.cli.Main.startFOP(Main.java:166)
         at org.apache.fop.cli.Main.main(Main.java:197)

 -

 ; SystemID: file:/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl;
 Line#: 223; Column#: 59
 javax.xml.transform.TransformerException: java.lang.NullPointerException
         at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)
         at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
         at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
         at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
         at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
         at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
         at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
         at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
         at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
         at 
 org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
         at 
 org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
         at 
 

Re: What is the status of fop ?

2010-01-27 Thread John Burgess
You could try running the transform separately to produce the .fo file, 
then feed that into fop afterwards.


--
John Burgess
Risk Decisions Limited
Whichford House
Parkway Court
Oxford Business Park South
OX4 2JY

T: 01865 718666
F: 01865 718600
M: 07984 863890
E: john.burg...@riskdecisions.com
W: http://www.riskdecisions.com




Mathieu Malaterre wrote:

Hi there,

  I am currently trying to check if my group can start using docbook
for writing high quality documentation. As far as I understand there
are three competitors dblatex, xmlroff and fop. dblatex is a strange
beast as it 'just works', but you cannot control anything (PNG file
are degraded).

I am now trying fop on my debian system:

$ fop  -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
-pdf article.pdf -xml in.xml

which returns the following error (*).

The input example was simply:

$ cat in.xml
?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
  articleinfo
titletitle/title
author
  firstnameauthor/firstname
  surnameauthor2/surname
  affiliation
orgnamebla/orgname
  /affiliation
/author
pubdate2001/pubdate
  /articleinfo
  section
titlesection 1/title
paratext section 1/para
figure
  titlefirst/title
  mediaobject
imageobject
  imagedata fileref=graphics2.png/
/imageobject
  /mediaobject
/figure
  /section
/article


Could someone please confirm whether including PNG file is supported or not ?

Thanks,
  



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



Re: What is the status of fop ?

2010-01-27 Thread Mathieu Malaterre
That was an issue with fop 0.94. For some reason I forgot to update my
system to the latest fop 0.95...

Sorry for the noise

On Wed, Jan 27, 2010 at 3:43 PM, John Burgess
john.burg...@riskdecisions.com wrote:
 You could try running the transform separately to produce the .fo file, then
 feed that into fop afterwards.

 --
 John Burgess
 Risk Decisions Limited
 Whichford House
 Parkway Court
 Oxford Business Park South
 OX4 2JY

 T: 01865 718666
 F: 01865 718600
 M: 07984 863890
 E: john.burg...@riskdecisions.com
 W: http://www.riskdecisions.com




 Mathieu Malaterre wrote:

 Hi there,

  I am currently trying to check if my group can start using docbook
 for writing high quality documentation. As far as I understand there
 are three competitors dblatex, xmlroff and fop. dblatex is a strange
 beast as it 'just works', but you cannot control anything (PNG file
 are degraded).

 I am now trying fop on my debian system:

 $ fop  -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
 -pdf article.pdf -xml in.xml

 which returns the following error (*).

 The input example was simply:

 $ cat in.xml
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
  articleinfo
    titletitle/title
    author
      firstnameauthor/firstname
      surnameauthor2/surname
      affiliation
        orgnamebla/orgname
      /affiliation
    /author
    pubdate2001/pubdate
  /articleinfo
  section
    titlesection 1/title
    paratext section 1/para
    figure
      titlefirst/title
      mediaobject
        imageobject
          imagedata fileref=graphics2.png/
        /imageobject
      /mediaobject
    /figure
  /section
 /article


 Could someone please confirm whether including PNG file is supported or
 not ?

 Thanks,



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





-- 
Mathieu

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



Re: What is the status of fop ?

2010-01-27 Thread Jeremias Maerki
I'd suggest:
- to upgrade to the latest FOP release (0.95). You seem to be using an
older release.
- to avoid running FOP with GCJ or any other GNU Classpath based JVM
because its XML support has proven to be quite buggy.

I'm happily producing PDFs from DocBook XSL 1.75 with FOP 0.95 and PNG
images.

On 27.01.2010 15:38:21 Mathieu Malaterre wrote:
 Thanks for the hint this is indeed reported in the FAQ:
 
 http://xmlgraphics.apache.org/fop/faq.html#saxexception-mismatch
 
 However I am already using the latest of xalan:
 
 $ apt-cache policy libxalan2-java
 libxalan2-java:
   Installed: 2.7.1-5
   Candidate: 2.7.1-5
   Version table:
  *** 2.7.1-5 0
 200 http://ftp.fr.debian.org testing/main Packages
 100 http://ftp.fr.debian.org unstable/main Packages
 100 /var/lib/dpkg/status
  2.7.1-2 0
 500 http://ftp.fr.debian.org lenny/main Packages
 
 
 Is there anything else I should be looking at ?
 
 Thanks again
 
 On Wed, Jan 27, 2010 at 3:21 PM, Pascal Sancho pascal.san...@takoma.fr 
 wrote:
  Hi Mathieu,
 
  PNG is supported by FOP (see [1] for further information)
 
  Reading your log, there is something wrong in your XSL-FO:
  WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)
 
  vs. root (http://www.w3.org/1999/XSL/Format)
 
  You should have a look into that direction.
  That is confirmed by the rest of the error message, thrown during the Xalan 
  stage.
 
  [1] http://xmlgraphics.apache.org/fop/0.95/graphics.html#png
 
  Pascal
 
  Mathieu Malaterre a écrit :
  Hi there,
 
    I am currently trying to check if my group can start using docbook
  for writing high quality documentation. As far as I understand there
  are three competitors dblatex, xmlroff and fop. dblatex is a strange
  beast as it 'just works', but you cannot control anything (PNG file
  are degraded).
 
  I am now trying fop on my debian system:
 
  $ fop  -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
  -pdf article.pdf -xml in.xml
 
  which returns the following error (*).
 
  The input example was simply:
 
  $ cat in.xml
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
  http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
  article
    articleinfo
      titletitle/title
      author
        firstnameauthor/firstname
        surnameauthor2/surname
        affiliation
          orgnamebla/orgname
        /affiliation
      /author
      pubdate2001/pubdate
    /articleinfo
    section
      titlesection 1/title
      paratext section 1/para
      figure
        titlefirst/title
        mediaobject
          imageobject
            imagedata fileref=graphics2.png/
          /imageobject
        /mediaobject
      /figure
    /section
  /article
 
 
  Could someone please confirm whether including PNG file is supported or 
  not ?
 
  Thanks,
  --
  Mathieu
  Ps: I haven't yet tried xmlroff
 
  (*)
  Jan 27, 2010 3:02:25 PM org.apache.fop.cli.InputHandler warning
  WARNING: javax.xml.transform.TransformerException: Making portrait
  pages on USletter paper (8.5inx11in)
  Jan 27, 2010 3:02:25 PM org.apache.fop.cli.InputHandler warning
  WARNING: javax.xml.transform.TransformerException: Read
  /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
  Jan 27, 2010 3:02:26 PM org.apache.fop.hyphenation.Hyphenator 
  getHyphenationTree
  SEVERE: Couldn't find hyphenation pattern en
  Jan 27, 2010 3:02:26 PM org.apache.fop.fo.FOTreeBuilder$MainFOHandler 
  endElement
  WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)
  vs. root (http://www.w3.org/1999/XSL/Format)
  Jan 27, 2010 3:02:26 PM org.apache.fop.fo.FOTreeBuilder fatalError
  SEVERE: javax.xml.transform.TransformerException: 
  java.lang.NullPointerException
  Jan 27, 2010 3:02:26 PM org.apache.fop.cli.Main startFOP
  SEVERE: Exception
  javax.xml.transform.TransformerException: java.lang.NullPointerException
          at 
  org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
          at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
          at org.apache.fop.cli.Main.startFOP(Main.java:166)
          at org.apache.fop.cli.Main.main(Main.java:197)
 
  -
 
  ; SystemID: file:/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl;
  Line#: 223; Column#: 59
  javax.xml.transform.TransformerException: java.lang.NullPointerException
          at 
  org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)
          at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
          at 
  org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
          at 
  org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
          at 
  org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
          at 
  org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
          at 
  

Re: What is the status of fop ?

2010-01-27 Thread Mathieu Malaterre
On Wed, Jan 27, 2010 at 3:54 PM, Jeremias Maerki d...@jeremias-maerki.ch 
wrote:
 I'd suggest:
 - to upgrade to the latest FOP release (0.95). You seem to be using an
 older release.
 - to avoid running FOP with GCJ or any other GNU Classpath based JVM
 because its XML support has proven to be quite buggy.

 I'm happily producing PDFs from DocBook XSL 1.75 with FOP 0.95 and PNG
 images.

Are your PNG still anti-aliased in your output PDF file ?

I cannot seems to find the option for controlling this.

Thanks,
-- 
Mathieu

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



Re: What is the status of fop ?

2010-01-27 Thread Jeremias Maerki
If you're referring to the Interpolate key in the image dictionary, no,
FOP doesn't have an option to set that. FOP embeds the PNG as is (pixel
by pixel, no resampling). Rendering of the bitmap is done by the PDF
viewer which FOP doesn't have much influence on. I guess the
scaling-method property could be used to map to the Interpolate key,
I haven't experimented with the Interpolate key, yet, and can't say if
that would solve your issue.

On 27.01.2010 16:08:19 Mathieu Malaterre wrote:
 On Wed, Jan 27, 2010 at 3:54 PM, Jeremias Maerki d...@jeremias-maerki.ch 
 wrote:
  I'd suggest:
  - to upgrade to the latest FOP release (0.95). You seem to be using an
  older release.
  - to avoid running FOP with GCJ or any other GNU Classpath based JVM
  because its XML support has proven to be quite buggy.
 
  I'm happily producing PDFs from DocBook XSL 1.75 with FOP 0.95 and PNG
  images.
 
 Are your PNG still anti-aliased in your output PDF file ?
 
 I cannot seems to find the option for controlling this.
 
 Thanks,
 -- 
 Mathieu


Jeremias Maerki


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