- PUBLIC METHODS
- SEE ALSO
Kite::XML2PS - reads an XML curve definition file and generates PostScript
use Kite::XML2PS; my $ps = Kite::XML2PS( filename => 'example.xml' ) || die $Kite::XML2PS::ERROR, "\n"; # return PostScript definitions for image and image path print "image definition: ", $ps->image(); print "image path: ", $ps->path(); # generate entire PostScript document with tiling, etc. print $ps->doc();
Module for converting an XML file containing curve definitions (see xml/kiteparts.dtd) into PostScript.
Constuctor method called to create a new Kite::XML2PS object. Accepts a reference to a hash array of configuration items or a list of
name => value pairs. The following items may be specified:
Specifies a filename from which the XML definition should be read. This parameter is mandatory. The XML content of this document should conform to the OpenKite layout format as specified in the xml/kiteparts.dtd file (relative to the distribution root directory).
Optional parameter which can be used to set the title for the document. Setting this value will override any title defined in the XML document.
Enables registration marks when set to any true value.
Specifies a border width in mm (default: 5mm). The clipping area will be inset this distance from the imageable area on the page. This is useful for printers that can't actually print to the edge of the area that they think they can.
The tiling procedure adds a small map to the top left hand corner of each page, indicating the position of the current page within the tiling set. This option can be set to 0 to disable this feature.
The file specified via the
filename option will be parsed and converted into PostScript definitions for the image as a whole (IMAGE) and the outline path (PATH). These can then be retrieved via the image() and path() method calls.
On error, the constructor returns undef. The error message generated can be retrieved by calling the error() class method, or by examining the $Kite::XML2PS::ERROR variable.
Returns a PostScript document containing the kite parts layed out as specified in the input file. The output is automatically tiled onto multiple pages.
Returns a PostScript string defining the image for the parts parsed from the input file.
Returns a PostScript string defining the the outline path of the parts parsed from the input file.
Simon Stapleton <firstname.lastname@example.org> wrote the original xml2ps.pl utility which performs the XML -> PostScript conversion.
Andy Wardley <email@example.com> re-packaged it into a module for integration into the Kite bundle.
$Revision: 1.3 $
Copyright (C) 2000 Simon Stapleton, Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.