Open topic with navigation
Export offers the option of rasterizing vector graphic content from source documents into a variety of graphics formats, including JPEG, PNG, WMF, and CGM. This solution is implemented with Windows Graphical Device Interface (GDI) code, and therefore is not portable to other platforms.
The output format of vector graphics is defined by using the
setOutputVectorGraphicType() method in the
OptionInfo class, and the options are defined as constants in the Export class.
To display vector graphics in presentation, word processing, and spreadsheet files on UNIX and Linux, Export can convert the files directly to JPEG by using a Java program named
kvraster.class. This program uses the Java Abstract Windowing Toolkit (AWT). The AWT requires access to an X Server.
To set up an X Server, do one of the following:
Run a virtual X Server, such as the Xvfb utility. This utility is included in the X11R6 distribution or can be downloaded from the following site:
For example, to run the Xvfb utility on a 512 Mb, Solaris 2.8 platform, follow these steps:
Start Xvfb at root:
/usr/X11R6/bin/Xvfb :1 -screen 0 1152x900x8 &
Set the display environment variable:
Make an X display available to the Java runtime using the
DISPLAY environment variable. No windows appear on the display. For example, set the
DISPLAY environment variable as follows:
After the X Server is set up, convert the file by following these steps:
Add the location of the JRE to the
PATH environment variable.
Use one of the following methods to set the graphic type to JPEG:
Convert the document to