Success!! I've gotten vector map plots at E-size and bigger, with
multiple plots per PDF even. I had to chase down quite a few issues,
and made a real mess of the code base, so will have to go back and
clean up some things. Basically, though, the three major bottlenecks

1) creation of pdf image objects every time drawImage was called - I
put in a cache that detected when the same image was used more than

2) direct streaming to the pdfstream by PDFGraphics2D

3) storage of the bytes in a PDFStream in a tempfile rather than a
byte array - I had about 24MB of temp files. This necessitated
rewriting the filters to work on streams instead of byte arrays, but
that ended up being straightforward

It's far far far faster than the SVG solution. On a 1GHz machine we
were plotting multiple E size plots into a PDF in about 12 seconds. 

Here is an example - the state of new hampshire at 44in x 68in. It's
about 3MB.

What is the position on tempfile use? I forget which JDK version added
them... I could probably make it semi-intelligent, where a buffer reverts to
a tempfile when it gets big enough. But that adds complexity of


Paul Reavis                                      [EMAIL PROTECTED]
Design Lead
Partner Software, Inc.              

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to