Java 5.0 PostScript Printing Regression?
I have noticed after upgrading to Java 5.0 (Update 11) that when printing to a post script printer the generated post script file is orders of magnatude greater than when printing to Java 1.4.2.
For example printing a single page in Java 5.0 generates a 1MB post script file where as using the exact same code, just using Java 1.4.2 the printed file is around 67 KB.
Has anyone else noticed this regression? Has this been documented or is there a work around for it?
Thanks in advance.
Scott
# 1
There were a couple of problems that were fixed in 5.0 updates but since
you have u11 I think you should have all of those
Is the app by any chance printing Swing text components?
Take a look at bug 6452415 on bugs.sun.com
I'd like you to try JDK 7 to see if its fixed there.
One way or another you'll learn something by this since there
are no open issues that I can think of.
Go to http://download.java.net/jdk7/archive/
and download b03 or later.
If that works then try b02 to be sure its that specific fix (and
not some other earlier fix).
Conversely if it makes no difference then its much
more certain this is a new problem that needs investigation.
-Phil.
# 6
Hi,
Glad to hear that this looks to be the issue.
Its possible in part that the reason the job didn't reduce completely down to
the original 1.4.2 size is that part of it is that Swing in some cases
detects printing and uses APIs that allow it to position glyphs so the string
measures more compatibly with the screen. This spool file overhead of specifying
the positions is necessary.
Or it may be that using the desktop font (eg Tahoma) adds a font download
into the Postscript job whereas before the printer didn't need to do that
as it may have been using a font that was in the printer's ROM.
Was the 1.7 b02 spool file size about the same as the one you are seeing
on 5u11? That will give an indication as to whether you'll get the full benefit
there (in a 1.5 backport).
I do think this was something that is worth backporting but haven't
yet done so. The 1.7 fix just went back recently and I wanted to see it it bake.
Also you commented :
> I noticed that both the current 5.0 and 6.0 JDK's don't destribute
> the font.properties files as was done in 1.4 and prior.
These do still exist. They are called fontconfig files as of 1.5
Full spec is here http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html
-phil.