Display Vector Graphics on UNIX and Linux
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
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). Alternatively, rather than rasterizing, Export can output text from vector graphics in SVG format, which works the same as on Windows.
To convert the file
-
If rasterizing, add the location of the JRE to the
PATH
environment variable. -
Use one of the following methods to set the graphic type to JPEG:
-
Use the
setOutputVectorGraphicType
method of theOptionInfo
class to set the type toExport.GRAPHIC_TYPE_JPEG
(for raster output) orExport.GRAPHIC_TYPE_SVG
(for text-only vector output). -
Set the
OutputVectorGraphicType
parameter of thedefunix.ini
template file toKVGFX_JPEG
(for raster output), orKVGFX_SVG
(for text-only vector output).
-
-
Convert the document to HTML. The graphics in the document are converted to JPEG or SVG and stored in the output directory.