The VectorGraphics package of FreeHEP Java Library enables any Java program to export to a variety of vector graphics formats as well as bitmap image formats. Among the vector formats are PostScript, PDF, EMF, SVF, SWF and CGM, while the image formats include GIF, PNG, JPG and PPM.
The package uses the standard java.awt.Graphics2D class as its interface to the user program. Coupling this package to a standard Java program is therefore quite easy. It also comes with a dialog box which allows you to choose between all the formats mentioned above and set specific parameters for them.