Goals
The META format is used to store and transport halftoned and cutting data from the RIP (Render) component to the Printer (Spooler) component. The META format must meet the following requirements:
-
Streaming transport format: allowing the RIP component to directly send the data it processes to the Printer component which can immediately start printing without the data stream being complete.
-
Random access store format: allowing the Printer component to nest multiple jobs efficiently. Especially rotating files needs a lot of random access
-
Compression: store and stream compressed data to efficiently use network and disk.
-
Open formats: the file format for storage should be using open formats as much as possible to allow easy re-use in other components (incl. external components).
Store format
The META data is stored in a folder inside the job folder named META. The folder contains the following files:
Info.xml |
The info file is an XML that contains all the properties to describe the job data. It contains general setup information. Definition of the keywords below in”META Job dictionary” |
00001.xml |
An XML dictionary that contains the page information for page 1. Definition of the keywords below in “META Page dictionary” |
00001.bmp |
The preview of page 1 in Windows BMP format. Current implementation is restricted to 24 bits RGB. |
00001.rtl |
Halftoned data in HP/RTL format. This file is only available for printers and not for cutters. Current implementation is restricted to planar interleaved RLE compressed lines. The number of bits per pixel is restricted to 1, 2, 4 and 8. See implementation limits below: HP-RTL implementation. |
00001.idx |
Index file containing the offsets per line in the *.rtl file indicating where the Esc *b command of the first plane/channel of that line starts. This index file contains 64 bits pointers and is used by the Printer component to get fast random access to the raster data for nesting purposes. This file is required when halftone data is present. |
00001.plt |
Cutting commands om HPGL/2 format. The file is only available for cutters and hybrid devices. Current implementation only supports a small subset of HPGL/2 document below: HPGL/2 implementation. |
00002.* |
Every page consist of at least the page XML with the page number written in 5 digits. The other files are optional and are only required when they are referenced from within the page XML. |
META Job dictionary
Tag |
Tag |
Description |
Job |
Dictionary containing the keywords below |
|
Name |
Display name of the job |
|
QueueName |
Name of the queue |
|
UserName |
Name of the user |
|
PrintMode |
Name of the print mode (informational) |
|
Reference |
Name of normalization profile used (informational) |
|
Copies |
Number of copies to be output |
|
Pages |
Number of pages in this job, is only available when the job is completely rendered |
|
MediaName |
Name of the media type to be used (informational) |
|
MediaSize |
Definition of the media size to be used. Attributes:
|
|
ContentRect |
The unionized area used by the image on all pages defined in Unit (1/18 inch). Left, Top, Right, Bottom in format %f,%f,%f,%f |
|
TrayName |
Name of the tray to be used |
|
Collate |
Boolean to indicate collate of copies |
|
DeviceDriver |
Driver to use |
|
DeviceURL |
URL of the connection to the device (printer/cutter), relative to the location of the spooler |
|
DriverSettings |
Driver settings XML used to create the META data |
|
Raster |
Boolean indicating if the job contains raster data |
|
Vector |
Boolean indicating if the job contains vector data |
|
Reference |
Reference profile used to produce this job. Only present when a reference profile was used |
|
Resolution |
Resolution of the image data in this job in units of 1/18th of an inch. The resolution is stored in the attributes “X” and “Y” |
META Page dictionary
Tag |
Tag |
Tag |
Tag |
Description |
Page |
Dictionary containing the keywords below |
|||
Name |
Optional Name of the page or tile |
|||
MediaSize |
Definition of the media size to be used. Attributes:
|
|||
TrayName |
Name of the tray to be used |
|||
ContentRect |
The unionized area used by the image on all pages defined in Unit (1/18 inch). Left, Top, Right, Bottom in format %f,%f,%f,%f |
|||
Feed |
Feed method to use after finishing the page. Values: |
|||
Cut |
Boolean defining if the machine must cut the media after printing/cutting |
|||
Raster |
Dictionary describing the raster/halftone data of this page. Attribute “File” contains the name of the file containing the RTL formated halftone data. |
|||
Size |
Dimensions of the raster/halftone data in pixels. Stored in the attributes “Width” and “Height” |
|||
Position |
Position of the raster/halftone data in pixels relative to the image-able area of the page. Stored in the attributes “X” and “Y” |
|||
Inks |
Dictionary describing the inks per channel / plane. Attribute “Count” defines the number of inks in the dictionary |
|||
Ink |
Ink channel description. Attibribute “Name” defines the channel name, attibute “Dotsize” defines the dot weights in the format %f,%f,… |
|||
Vector |
Attribute “File” contains the name of the file containing the HPGL/2 cutting data. |
|||
Preview |
Attribute “File” contains the name of the file containing the preview of the page. |
Current implementation requires referenced files to follow the document structure described above. Therefore the files are assumed to have the same base name (name without extension) as the page XML and are assumed to be next to the page XML.
HP-RTL implementation
The following HP-RTL commands are honored and are mandatory:
-
Esc %0A : Start HP/RTL at current position
-
Esc *p x X : Define left position of raster in pixels
-
Esc *p y Y : Define top position of raster in pixels
-
Esc *r width S : Define width of raster in pixels
-
Esc *r height T : Define height of raster in pixels
-
Esc *r- plane count U : Define number of planes / color channels
-
Esc *b2M : Select RLE compression
-
Esc *r0A : Start raster data
-
Esc *b byte count V data : Line of data per plane/channel RLE compressed
-
Esc *b byte count W data : Last plane/channel of data of the current line
-
Esc *rC : End raster data
-
Esc %0B : Stop HP-RTL mode HP-RTL commands that are not listed here are ignored.
HPGL/2 implementation
Two types of cutting commands exist. The sets are mutually exclusive. The first set is for driving conventional cutting plotters that are usually driven by languages like HPGL/2. The second set is for defining contour information for NC and contour cutting systems like i-Cut.
Low level cutting
The coordinates used for X and Y are defined as absolute locations in integers at the step resolution of the cutting plotter.
Command |
Parameters |
Description |
IN |
Initialize. Starts cutting data |
|
QL |
0 |
Quality level. Set to 0 for low-level cutting |
SP |
pen # |
Select pen/tool. 1 = knife. 2 = pencil. |
PU |
Lift the tool |
|
PD |
Lower the tool |
|
PA |
X, Y |
Move/draw/cut line to absolute position |
BS |
Start of a sequence of curve segments |
|
BE |
End of a sequence of curve segments |
|
PG |
Advance page. End of cutting data for this page |
High level cutting
The coordinates used for X and Y are defined as absolute locations in real numbers at 18 steps per inch (=Unit).
Command |
Parameters |
Description |
IN |
Initialize. Starts cutting data |
|
QL |
100 |
Quality level. Set to 100 for high-level cutting |
SP |
pen # |
Select pen/tool. 1 = knife. 2 = pencil. |
PC |
pen #, color |
Sets the color of the tool. Tool 1 = RGB, Tool 2 = CMYK. Color values in range 0-255. |
PU |
Lift the tool |
|
PD |
Lower the tool |
|
PA |
X, Y |
Move/draw/cut line to absolute position |
BZ |
X1, Y1, X2, Y2, X3, Y3 |
Draw/cut a bezier curve |
CO |
ID, Value |
Passes private information specific to the driver. Both ID and Value are integers |
PG |
Advance page. End of cutting data for this page |
Streaming format
The streaming format is a TCP stream that packages the files one after the other in the following sequence:
-
Job XML
-
Page XML of page 1
-
RTL data (if present)
-
Index data (if present)
-
HPGL/2 data (if present)
-
Preview
-
-
Page XML of page 2
-
etc.
-
Every file is sent as a sequence of chunks. The chunks allow the sender to start sending without having to know the final size. The last chunk of a file contains an EOF marker. Each chunk follows the following format in i386 format (thus needs swaps on PowerPC):
Magic |
Uint32 |
0x4D455441 (‘META’) to check validity of the chunk structure |
Seq. |
Uint32 |
Chunk sequence number. Starts with 0. |
Type |
Uint32 |
|
Size |
Uint32 |
Size of data following this chunk |
Data |
If the type is 1 then the name of the file. An empty name indicates last file has been send. If the type is 2 or 3 the amount of data specified by Size is send. |