You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Pedro Mendoza <pe...@adpclearing.org> on 2002/08/29 14:50:00 UTC

problem with printing images via FOP

hi everybody, 

i have modified the FopPrintServlet.java sample code into a component that can be used from a standalone application to print directly from a XML/XSL input combination to the default printer, the solutions works (very fast BTW) but i am facing problems with the images included in the document, it means, i do not get any errors in the log but the images does not get printed

previously i have rendered a PDF file using the same XML/XSL combination and everything is correct (including the image)

enviroment: JRE 1.4 on Win2K, FOP 0.20.4

problematic fo sentence: <fo:block background-image="file:c:\background.gif" background-repeat="no-repeat">

any ideas ?, thanks in advance
pedro.mendoza@adpclearing.org

Re: problem with printing images via FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Pedro Mendoza wrote:
> more details, apparently the problem is related to the AWT (AWT is also 
> internally used by FOP when printing directly) rendering mode,
Probably this part of the code is relevant:
AWTRenderer.java(523)
      protected void drawImageScaled(int x, int y, int w, int h,
				   FopImage image,
				   FontState fs) {
	// XXX: implement this
     }

J.Pietschmann


Re: problem with printing images via FOP

Posted by Pedro Mendoza <pe...@adpclearing.org>.
more details, apparently the problem is related to the AWT (AWT is also internally used by FOP when printing directly) rendering mode, for instance try using FOP as standalone app (fop.bat) with the AWT rendering mode

ie. ... c:\fop-0.20.4>fop -xsl myfile.xsl -xml myfile.xml -awt

and include a <fo:block background-image="file:c:\background.gif" background-repeat="no-repeat"> in your xsl file, you will find that your image is not rendered, i have tried GIF and JPEG files without luck

however if you specify the PDF rendering mode with the SAME input files, the image get rendered without problems

ie. ... c:\fop-0.20.4>fop -xsl myfile.xsl -xml myfile.xml -pdf myfile.pdf

the problem is only found with the <fo:block background-image= ... > sentence and NOT with <fo:external-graphic src=.../> sentence

any ideas ?, thanks in advance,
pedro.mendoza@adpclearing.org
  ----- Original Message ----- 
  From: Pedro Mendoza 
  To: fop-user@xml.apache.org 
  Sent: Thursday, August 29, 2002 2:50 PM
  Subject: problem with printing images via FOP


  hi everybody, 

  i have modified the FopPrintServlet.java sample code into a component that can be used from a standalone application to print directly from a XML/XSL input combination to the default printer, the solutions works (very fast BTW) but i am facing problems with the images included in the document, it means, i do not get any errors in the log but the images does not get printed

  previously i have rendered a PDF file using the same XML/XSL combination and everything is correct (including the image)

  enviroment: JRE 1.4 on Win2K, FOP 0.20.4

  problematic fo sentence: <fo:block background-image="file:c:\background.gif" background-repeat="no-repeat">

  any ideas ?, thanks in advance
  pedro.mendoza@adpclearing.org