Hi Peter,

There is no bug with this functionality. You can have a look at the FO file that I have used...

1. Update the configuration file for the image mode (b+w  or  color)
2. Run the following command from the command prompt...
*C:\mywork\FOP\fop-0.95> fop -c C:\fop.xconf -fo C:\mywork\JavaXSLTSamples\XSLFOSamples\hello.fo -afp C:\mywork\JavaXSLTSamples\XSLFOSamples\hellotest.afp
*
According to the mode, the image will be rendered with color or black and white...

Thanks,
Venkat.


Peter Hancock wrote:
At present FOP does not respect an image color setting of 'b+w' when rendering svg to afp (see Bug 48237)

According to the AFP spec (http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/HA3N1M00/7.47.1?SHELF=APSBK320&DT=20001002123303 <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/HA3N1M00/7.47.1?SHELF=APSBK320&DT=20001002123303>) it does not seem possible to specify a grayscale color space, and so my question is how should colour be controlled?

Since AFPGraphics2D is responsible for setting the color on the MODCA GraphicsObject prior to calling drawing methods, would a sensible fix to the problem be to convert the awt.Color before calling this setter?

Any thoughts would be most welcome,

Pete

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
	<fo:layout-master-set>
		<fo:simple-page-master master-name="page">
			<fo:region-body 
				margin-right="0.5in" 
				margin-left="0.5in" 
				margin-bottom="1in" 
				margin-top="0.5in" 
				region-name="body"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="page">
	<fo:flow flow-name="body">
		<fo:block break-before="page" top="4in">
		Testing image <fo:external-graphic src="C:\mywork\JavaXSLTSamples\XSLFOSamples\blue.png"/> in between words
		</fo:block>
	</fo:flow>
	</fo:page-sequence>
</fo:root>

Reply via email to