I had a really horrible Java print bug today 🙁
I had a sample PDF file with some large rotated text on one of the pages. It displays fine in our renderer and if I printout the page on its own it also prints correctly. If I print a range of pages, it is still fine. However, if I print the whole Document using Java Printing System, the page is blank. I can see the text is being rendered to the page but JPS just gives me a blank white page. And the issue is not in my code but is deep inside Java.
There is a workaround, which is to turn the huge text into an image or print the pages separately. And it only effects WIndows JVM 1.6 (Java on the Mac is fine). But it is really irritating and I hate such ‘resolutions’.
Still, I’ve now got a bug in my code – I much prefer those as they are usually fixable 😉
What is your worst bug?
This post is part of our “Printing Articles Index” in these articles, we aim to help you understand printing in Java and PDF’s.
Do you need to write or read JPEG in Java?
We have an easy guide on how to write JPEG in Java using ImageIO and JDeli.
You can learn how to read/write most of the image files in ImageIO. However, it gives little control over the process.
JDeli is easy to use and offers complete support, so why don't you give a try?