Hi, I am having colour problems with AFP and wonder if the FOP community can help me.
I have a fo:block with a non-white background- colour (an arbitrary #AFA) and I have modified FOP to overlay an image that is largely composed of the same colour. The image is defined within the AFPPainter using a org.apache.xmlgraphics.java2d.Graphics2DImagePainter2D; the Graphics2D drawing commands being defined in the pai nt method. This is then wrapped in a org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D and passed to AFPPainter.drawImage. This method is responsible for rendering the image: A stack trace shows that a call org.apache.xmlgraphics.image.loader.impl.ImageConverterG2DBitmap.convert is responsible for generating a BufferedImage. FOP then uses AFPImageHandlerRenderedImage to handle the image: the bytes of the buffered image are directly written to the AFP and the image is tagged as an FS11 IOCA. When I print the afp there is a visible difference in the blocks background colour and the images background colour and so I would like to know what sort of steps and considerations are required to resolve this. I am currenty unclear exactly how the coloured areas of block like elements are represented in the AFP and how I can synchronize this with image creation. Whilst I research this further myself, it would be great to have the knowledge confirmed by other FOP developers with experience here. This issue has cropped whilst working on a FOP extension for drawing rounded corners as my solution for generating them for AFP is to use corner images. I am not using GOCA due to print server support issues. I would be very grateful for any of your thoughts. Thanks, Pete