BufferedImage raster data in Java

Most of the time, the abstraction you get in Java is brilliant. It hides the complexity and lets you get on with real-life problem solving. This is especially true of the Image classes where you can forget about Tiffs, PNGs and Jpegs and just work with images. Occasionally though you need to dig deeper and…

Read More

New fogbugz release

We use fogbugz internally for our forums and internal issue tracking. If you send us an email or a question it usually ends up in fogbugz. Issue tracking software is invaluable for staying ontop of all the inquiries, questions, issues and PDFs we get sent as well as all the ideas we have internally and…

Read More

PDF to image quality

The PDF file format was designed as much as possible to be Vector graphics. The problem with bitmaps and pixels is that pixels can only be on or off. While you can use some clever tricks such as anti-aliasing and hinting to smooth lines, you can’t draw fractions of a pixel. If a line is…

Read More

JButton backgrounds

We use a lot of JButtons in our Java PDF viewer and thought that the following observations might be of help to other Java developers. When you create a JButton it can be transparent (no background) and you can see through them or have a background color. This is done using the method setOpaque(boolean flag)…

Read More

Java Printing page size problem

Java has a very flexible printing system called JPS which makes printing very easy. Any JComponent can be made to print its contents by adding a print method public int print(Graphics graphics, PageFormat pf, int page) throws PrinterException {} When Java needs to print, it calls this method and whatever you paint onto the graphics…

Read More