Okay, so here's my problem:
We use FOP for creating "pretty" report output. We use the pdf option if the user wants a file, AWT for previewing, and the -print option for printing them. We are using FOP 0.25.x, which I fully recognize is not the newest version, but upgrading to 0.95 appears to be a non-trivial task that I don't necessarily want to undertake.
Anyway, it was noticed by one of our users that when printing ID cards (generated via FOP -print option) to the id card printer, the images on the cards (pictures of the employees) had some corruption in them...sort of like like green and reds dots and lines. We also discovered that if we sent the exact same print request to one of our HP color laserjets, it printed fine. To add to the strangeness, if we use FOP to create a PDF of the ID card and then print it via acrobat reader on the card printer, it prints fine.
I eventually discovered that it had something to do with the scaling of the images...we were scaling 600px high images down to something like 120px. If I presized the images down, even just halfing them, the corruption went down noticeably. Similarly, when I upsized the images, the corruption went up.
So my question: anybody have ANY idea what is going on here? Or has ever run into such a thing?
Since I don't know why this is happening, I don't know how to fix the root cause, but I've been working through some various workarounds:
1) Use FOP to create a pdf of the image and then print that via Java. This seems like an obvious answer, but some Googling around showed that printing a PDF via Java is not trivial. I've seen the PDF Renderer project on java.net, but seems pretty bulky for a single very specific application.
2) Try to resize the images before giving it to FOP. This also seemed pretty straightforward, however our various users can setup stylesheets for these id cards however they want and using "pt" and "in" sizing in them seems to be pretty common...I don't know of any good way to map that to a pixel resizing.
If anybody has any insight into the root cause, ways to make these work arounds work, and/or another idea, you'd be in my debt.