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 the eOutputVectorGraphicType
member of the KVXMLOptions
structure, and the options are enumerated in KVXMLGraphicType
in kvxml.h
. KVXMLOptions and KVXMLGraphicType.
To display vector graphics in presentation, word processing, and spreadsheet files on UNIX and Linux, Export converts 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 you can download it from the following site:
http://www.x.org/Downloads.html
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:
setenv DISPLAY:1.0
Make an X display available to the Java runtime by using the DISPLAY
environment variable. No windows appear on the display. For example, set the DISPLAY
environment variable as follows:
setenv DISPLAY computername
:0.0
or
setenv DISPLAY ipaddress
:0.0
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.
Set OutputVectorGraphicType
to KVGFX_JPEG
in the defunix.ini
template file or directly in the API.
Convert the document to
kvvector.jar
must reside in the output directory.
|