problem with FOP 0.9 and fo:external-graphics

2006-01-25 Thread [EMAIL PROTECTED]
Hi all
I'm using fop 0.9 and i try to include a gif in my rtf file.
I tried with these tags but I had no solution:

fo:external-graphic 
src=url(file:///C:/jakarta-tomcat-5.5.7/webapps/admin_console/images/printHeader.GIF)
  content-height=200pt content-width=200pt /

fo:external-graphic src=url(/admin_console/images/printHeader.GIF)  
content-height=200pt content-width=200pt /

fo:external-graphic 
src=file:///C:/jakarta-tomcat-5.5.7/webapps/admin_console/images/printHeader.GIF)
  content-height=200pt content-width=200pt /
any idea?



Re: problem with FOP 0.9 and fo:external-graphics

2006-01-25 Thread Jeremias Maerki
(Please send questions to fop-users@xmlgraphics.apache.org in the future
so all users can profit from answers given to your question. fop-dev is
for development discussions. Thank you.)

RTF output currently doesn't support GIF images. Please convert them to
PNG.

On 25.01.2006 10:17:09 [EMAIL PROTECTED] wrote:
 Hi all
 I'm using fop 0.9 and i try to include a gif in my rtf file.
 I tried with these tags but I had no solution:
 
 fo:external-graphic 
 src=url(file:///C:/jakarta-tomcat-5.5.7/webapps/admin_console/images/printHeader.GIF)
   content-height=200pt content-width=200pt /
 
 fo:external-graphic src=url(/admin_console/images/printHeader.GIF)  
 content-height=200pt content-width=200pt /
 
 fo:external-graphic 
 src=file:///C:/jakarta-tomcat-5.5.7/webapps/admin_console/images/printHeader.GIF)
   content-height=200pt content-width=200pt /
 any idea?



Jeremias Maerki



Printing on HP Unix using FOP

2006-01-25 Thread Gosselin, Michael
Hello,

We have installed FOP on our HP/Compaq Tru64 UNIX V5.1A (Rev. 1885)
operating system.  We've done this so I can develop a java program to print
a PDF (or other similarly rendered file) to a printer.

The documentation for fop -print help is, well, limited.  There seems to be
some setup we need to do in order to get this working.

Has anyone been able to create a PDF file using FOP, and then print it to a
printer?

All help is appreciated.

Oh, I can see the Yahoo! group, but searching for -print doesn't help
much.

Michael Gosselin



Re: Printing on HP Unix using FOP

2006-01-25 Thread David Delbecq
don't know for fop specific, but isn't this shell command working on HP-UX?

lp /tmp/generated.pdf


Le Mercredi 25 Janvier 2006 17:41, Gosselin, Michael a écrit :
 Hello,
 
 We have installed FOP on our HP/Compaq Tru64 UNIX V5.1A (Rev. 1885)
 operating system.  We've done this so I can develop a java program to print
 a PDF (or other similarly rendered file) to a printer.
 
 The documentation for fop -print help is, well, limited.  There seems to be
 some setup we need to do in order to get this working.
 
 Has anyone been able to create a PDF file using FOP, and then print it to a
 printer?
 
 All help is appreciated.
 
 Oh, I can see the Yahoo! group, but searching for -print doesn't help
 much.
 
 Michael Gosselin
 
 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Pingouins dans les champs, hiver méchant


RE: Printing on HP Unix using FOP

2006-01-25 Thread Gosselin, Michael
 

 -Original Message-
 From: David Delbecq [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 25, 2006 11:48 AM
 To: fop-dev@xmlgraphics.apache.org
 Subject: Re: Printing on HP Unix using FOP
 
 don't know for fop specific, but isn't this shell command 
 working on HP-UX?
 
 lp /tmp/generated.pdf

No, because when I do that, all I get is the code for the PDF document.  You
know, the stuff that looks like:

%PDF-1.3
%~1/21/4!
...

I need it to actually print a rendered PDF file.  I thought the command

fop.sh -xml foo.xml -xsl foo.xsl -print

Would work, but it doesn't.  I get this output:

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
the
value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:138)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:142)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:62)
at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
at
org.apache.fop.render.awt.AWTRenderer.setupFontInfo(AWTRenderer.java:505)
at
org.apache.fop.apps.StreamRenderer.startRenderer(StreamRenderer.java:187)
at
org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:240)
at
org.apache.xalan.transformer.ResultTreeHandler.flushDocEvent(ResultTreeHandl
er.java:826)
at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle
r.java:934)
at
org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle
r.java:243)
at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
673)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2339)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2160)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1213)
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3372)
at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:433)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown
Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown Source)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
h(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134)
at org.apache.fop.apps.Driver.render(Driver.java:498)
at org.apache.fop.apps.PrintStarter.run(PrintStarter.java:120)
at org.apache.fop.apps.Fop.main(Fop.java:62)

Michael Gosselin


Re: Printing on HP Unix using FOP

2006-01-25 Thread Chris Bowditch

Gosselin, Michael wrote:


Hello,

We have installed FOP on our HP/Compaq Tru64 UNIX V5.1A (Rev. 1885)
operating system.  We've done this so I can develop a java program to print
a PDF (or other similarly rendered file) to a printer.

The documentation for fop -print help is, well, limited.  There seems to be
some setup we need to do in order to get this working.

Has anyone been able to create a PDF file using FOP, and then print it to a
printer?


Please note that the -print option from FOP's command line is not 
equivalent to printing a PDF. It invokes the AWT Renderer, which uses 
AWT's font metrics and layout to place text. AWT's Renderer has a lot of 
differences from the appearance of a rendered PDF.


BTW, this question would probably be better suited to the fop-users list.

Chris




Re: Printing on HP Unix using FOP

2006-01-25 Thread Chris Bowditch

Gosselin, Michael wrote:



I need it to actually print a rendered PDF file.  I thought the command

fop.sh -xml foo.xml -xsl foo.xsl -print

Would work, but it doesn't.  I get this output:

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
the
value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:138)


As already mentioned the -print option uses the AWT Renderer, which in 
turn requires an X Windows Server. If you have JDK version  1.4, then 
you can modify fop.bat so the call to java has the option


-Djava.awt.headless=true

to get AWT working on a Unix system without X Windows present. But I 
suspect that printing the AWT version of the document will not be good 
enough as it will look very different to the PDF.


snip/

Chris




Re: Printing on HP Unix using FOP

2006-01-25 Thread Clay Leeds
On Jan 25, 2006, at 8:58 AM, Gosselin, Michael wrote:-Original Message-From: David Delbecq [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 25, 2006 11:48 AMTo: fop-dev@xmlgraphics.apache.orgSubject: Re: Printing on HP Unix using FOPdon't know for fop specific, but isn't this shell command working on HP-UX?lp /tmp/generated.pdf No, because when I do that, all I get is the code for the PDF document.  Youknow, the stuff that looks like:"%PDF-1.3%~1/21/4!..."I need it to actually print a rendered PDF file.  I thought the command	fop.sh -xml foo.xml -xsl foo.xsl -printWould work, but it doesn't.  I get this output:[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser[INFO] FOP 0.20.5[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser[INFO] building formatting object treejava.lang.InternalError: Can't connect to X11 window server using ':0.0' asthevalue of the DISPLAY variable.        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)        atsun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:138)        at java.lang.Class.forName0(Native Method)        at java.lang.Class.forName(Class.java:142)        atsnipMichael Gosselin It looks like you're running your system 'headless' . There's a FAQ[1] related to problems running FOP  Batik headless, and [1] shows some workarounds.My company had similar problems, which we resolved by outputting to PostScript (-ps), and then `cat`-ing the file to a PostScript printer like this:	fop.sh -xml foo.xml -xsl foo.xsl -ps foo.ps | cat foo.ps  /dev/lp0HTH!As a bonus, you can pass the PS file through a PostScript RIP system like GhostScript and generate a PDF file (although it might make more sense to just generate a PDF file in the first place).[1]http://xmlgraphics.apache.org/fop/0.20.5/graphics.html#batik

Re: Printing on HP Unix using FOP

2006-01-25 Thread David Delbecq
Looks like your hp-ux lp configuration has no filter for pdf.
You could render it to pdf, pass it thru pdf2ps and send the ps to printer 
using lp.
somethings like that?

fop.sh -xml foo.xml -xsl foo.xsl -pdf | pdf2ps | lp -s

for details on use of lp for hp-ux:
http://docs.hp.com/en/B2355-90680/lp.1.html


Note to clay, sending a ps to /dev/lp0 works only if
attached printer is postscript capable (most professional printers do but 
anyway not all), requires script to have write access to device (that part is 
of more concern) and finally bypass printer spooling (which most admin would 
certainly not appreciate a lot).


Le Mercredi 25 Janvier 2006 17:58, Gosselin, Michael a écrit :
 -Original Message-
 From: David Delbecq [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 25, 2006 11:48 AM
 To: fop-dev@xmlgraphics.apache.org
 Subject: Re: Printing on HP Unix using FOP

 don't know for fop specific, but isn't this shell command
 working on HP-UX?

 lp /tmp/generated.pdf

No, because when I do that, all I get is the code for the PDF document.  You
know, the stuff that looks like:

%PDF-1.3
%~1/21/4!
...

I need it to actually print a rendered PDF file.  I thought the command

   fop.sh -xml foo.xml -xsl foo.xsl -print

Would work, but it doesn't.  I get this output:

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
the
value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:138)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:142)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:62)
at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
at
org.apache.fop.render.awt.AWTRenderer.setupFontInfo(AWTRenderer.java:505)
at
org.apache.fop.apps.StreamRenderer.startRenderer(StreamRenderer.java:187)
at
org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:240)
at
org.apache.xalan.transformer.ResultTreeHandler.flushDocEvent(ResultTreeHandl
er.java:826)
at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle
r.java:934)
at
org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle
r.java:243)
at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
673)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2339)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2160)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1213)
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3372)
at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:433)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown
Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown Source)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
h(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at
org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134)
at org.apache.fop.apps.Driver.render(Driver.java:498)
at org.apache.fop.apps.PrintStarter.run(PrintStarter.java:120)
at org.apache.fop.apps.Fop.main(Fop.java:62)

Michael Gosselin

-- 

David Delbecq
Royal Meteorological Institute of Belgium


DO NOT REPLY [Bug 38342] - java.lang.OutOfMemoryError: Java heap space

2006-01-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=38342.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38342


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2006-01-25 21:57 ---
Please don't use Bugzilla for questions.

Check the FAQ: http://xmlgraphics.apache.org/fop/faq.html#OutOfMemoryException
It contains the most important information on tracking down memory problems. If
that doesn't help get back to use on the fop-users mailing list. Good luck.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 37506] - [Patch] Refactor FontReaders (PFM and TTF)

2006-01-25 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=37506.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37506


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-01-25 22:18 ---
Patch (finally) applied. Thanks for it! Something small but still worthwhile.
http://svn.apache.org/viewcvs?rev=372317view=rev

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.