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 XmlOptionInfo 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

  1. If rasterizing, add the location of the JRE to the PATH environment variable.

  2. Use one of the following methods to set the graphic type to JPEG:

    • Use the setOutputVectorGraphicType method of the OptionInfo class to set the type to Export.GRAPHIC_TYPE_JPEG (for raster output) or Export.GRAPHIC_TYPE_SVG (for text-only vector output).

    • Set the eOutputVectorGraphicType parameter of the defunix.ini template file to KVGFX_JPEG (for raster output), or KVGFX_SVG (for text-only vector output).

  3. Convert the document to XML. The graphics in the document are converted to JPEG or SVG and stored in the output directory.