Partners Contact US Site Map Blog
A professional PDF Converter, PDF Writer, PDF Creator, PDF Editor, HTML Converter, Postscript Converter, AutoCAD DWG Converter, as well as PCL Converter, etc.  

HPGL (HP-GL)

HPGL (Hewlett-Packard Graphics Language)
HPGL (Hewlett-Packard Graphics Language) is the standard print format for HP plotters, i.e., the data stream sent to HP (and compatible) plotters. If you are now plotting to a Hewlett-Packard plotter, you are using HPGL!. Most CAD programs output HPGL directly because they can print on HP plotters.

HPGL is a an open language vector graphics file format (as opposed to raster or bit-map), assuring optimal file size with very fast and 100% accurate rendering. HPGL/RTL can be output by all CAD/CAM/CAE systems. All HP printers starting with the LaserJet 3 include HPGL as an integral part of PCL support. RTL (raster transfer language) is a raster-based specification and a subset of standalone HPGL (but not within PCL).
 
HPGL, sometimes hyphenated as HP-GL, is the primary printer control language used by Hewlett-Packard plotters. The name is an initialism for Hewlett-Packard Graphics Language. It later became a standard for almost all plotters.

The language is formed from a series of two letter codes, followed by optional parameters. For instance an arc can be drawn on a page by sending the string:

AA100,100,50;

This means Arc Absolute, and the parameters place the center of the arc at 100,100 on the page, with a starting angle of 50 degrees measured counter-clockwise. A fourth optional parameter (not used here) specifies how far the arc continues, and defaults to 5 degrees.

Typical HPGL files started with a few setup commands, followed by a long string of graphics commands. For instance:
 

An example HPGL file

Command Meaning
IN; initialize, start a plotting job
IP; set the initial point (origin), in this case the default 0,0
SC0,100,0,100; set the scale so the page is 0 to 100 in both X and Y directions
SP1; select pen 1
PU0,0; move pen to starting point for next action
PD100,0,100,100,0,100,0,0; put down the pen and move to the following locations (draw a box around the page)
PU50,50; lift the pen and move to 50,50
CI25; draw a circle with radius 25
SS; select the standard font
DT*,1; set the text delimiter to the asterisk, and don't print them (the 1, meaning "true")
PU20,80; lift the pen and move to 20,80
LBHello World*; draw a label
 
The coordinate system was based on the smallest units one of their plotters could support, and was set to 25 µm (i.e. 40 units per millimeter, 1016 per inch). The coordinate space was positive or negative floating point numbers, specifically ±230.
 
 
 
 
 
 
 
 

Home | Site Map | VeryPDF.com | VeryPCL.com | Contact | Blog
Copyright © 2002- VeryDOC.com Company. All Rights Reserved.