Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.

What is HPGL? PCB Plotter File Format Guide

Back when I started in PCB design, pen plotters were still common in many engineering departments. I remember feeding large sheets of vellum through an HP plotter and watching the pen carriage dance across the paper, drawing component outlines and board borders with mechanical precision. The language driving that plotter was HPGL, and while pen plotters have largely disappeared from modern production floors, HPGL files remain surprisingly relevant in PCB manufacturing—especially for CNC milling and certain legacy workflows.

This guide explains what HPGL is, how it works, and where you might encounter it in PCB design and fabrication.

What is HPGL?

HPGL, short for Hewlett-Packard Graphics Language, is a printer control language originally developed by HP for controlling pen plotters. Introduced in 1977 with the HP-9872 plotter, HPGL became the de facto standard for vector plotting across virtually all plotter manufacturers.

The language consists of simple two-letter mnemonic commands followed by optional parameters. These commands instruct the plotter to perform actions like raising the pen, lowering the pen, moving to specific coordinates, and drawing arcs or circles. Because HPGL files are plain ASCII text, you can open them in any text editor to inspect or modify the plotting instructions directly.

HPGL’s simplicity made it universally supported. Nearly every CAD program from the 1980s onward could export HPGL files, and this ubiquity kept the format alive long after pen plotters became obsolete. Today, HPGL finds application in CNC milling machines, laser engravers, vinyl cutters, and certain PCB isolation routing systems.

HPGL vs. HP-GL/2: Understanding the Versions

HP released an updated version called HP-GL/2 (often written as HPGL/2) to address limitations in the original specification.

Key Differences Between HPGL and HPGL/2

FeatureHPGL (Original)HPGL/2
Line WidthDetermined by physical penProgrammable in file
File FormatASCII onlyASCII and binary
Resolution25 µm (1016 units/inch)Higher resolution supported
Polygon FillLimitedFull polygon fill support
FontsBasic character setsEnhanced font support
Raster GraphicsNot supportedSupported
Color DefinitionLimited to pen carouselExtended color range

The original HPGL couldn’t specify line width because physical pen thickness determined the line weight. When inkjet and laser plotters emerged, this limitation became problematic. HPGL/2 introduced programmable line width, polygon fills, and a binary format option for faster transmission and smaller file sizes.

For PCB applications, both versions remain in use depending on the target equipment and software capabilities.

HPGL File Structure and Commands

HPGL files follow a straightforward structure: initialization commands, followed by plotting commands, followed by termination. The ASCII format makes these files human-readable—a significant advantage for debugging and manual editing.

Common HPGL Commands

CommandNameFunction
INInitializeResets plotter to default state
SPSelect PenChooses pen number (1-8 typically)
PUPen UpRaises pen, optionally moves to coordinates
PDPen DownLowers pen, optionally moves while drawing
PAPlot AbsoluteMoves to absolute coordinates
PRPlot RelativeMoves relative to current position
CICircleDraws circle with specified radius
AAArc AbsoluteDraws arc at absolute coordinates
ARArc RelativeDraws arc relative to current position
LTLine TypeSets line pattern (solid, dashed, etc.)
VSVelocity SelectSets pen speed
SCScaleSets user coordinate scaling

Sample HPGL File Structure

A simple HPGL file drawing a square might look like this:

IN;SP1;PU0,0;PD1000,0;PD1000,1000;PD0,1000;PD0,0;PU;SP0;

Breaking this down:

  • IN; initializes the plotter
  • SP1; selects pen #1
  • PU0,0; raises pen and moves to origin
  • PD1000,0; lowers pen and draws to (1000,0)
  • Subsequent PD commands continue drawing the square
  • PU; raises pen after drawing
  • SP0; returns pen to holder

HPGL Coordinate System

HPGL uses a coordinate system measured in “plotter units” (plu). The standard resolution is:

  • 40 plotter units per millimeter
  • 1016 plotter units per inch
  • Minimum resolution of 25 µm (0.025 mm)

This resolution is adequate for most mechanical plotting but falls short of modern PCB fabrication requirements. Gerber RS-274X, by comparison, typically uses resolutions of 2.4 or 2.5 format (0.0001 inch or 0.00001 inch precision).

HPGL in PCB Design Applications

While Gerber files dominate PCB fabrication, HPGL serves specific purposes in the PCB design workflow.

CNC Milling and Isolation Routing

One of the most common modern uses for HPGL in PCB work is driving CNC milling machines for prototype board production. Programs like Sprint-Layout export HPGL files (.plt) that contain:

  • Isolation routing paths
  • Drilling coordinates
  • Board outline cuts

The CNC controller interprets HPGL pen-up/pen-down commands as tool-up/tool-down motions, making the format surprisingly well-suited for routing operations. Some users convert HPGL to G-code for more advanced CNC machines, but many desktop PCB mills accept HPGL directly.

PCB Software Export Capabilities

Design ToolHPGL ExportNotes
KiCadYesFile > Plot > HPGL format
EagleVia ULP scriptsUser Language Programs available
Altium DesignerYesFabrication Outputs menu
Sprint-LayoutYesPrimary format for isolation milling
OrCADYesPlot to HPGL driver
ProtelYesLegacy support
Easy-PCYesOutput menu option

Schematic Documentation

Some design tools export schematics to HPGL for archival or plotting purposes. KiCad, for example, includes an HPGL export option for schematic sheets through its command-line interface. This creates plotter-ready documentation that can be printed on large-format plotters or converted to other vector formats.

Legacy Manufacturing Systems

Older manufacturing equipment—particularly automated test fixtures and legacy CAM systems—may still require HPGL input. Companies with long product lifecycles sometimes maintain HPGL workflows because replacing validated equipment isn’t cost-effective.

HPGL Compared to Other PCB File Formats

Understanding where HPGL fits among PCB file formats helps you choose the right output for your application.

PCB File Format Comparison

FormatTypePrimary UseIntelligence Level
HPGLVector plottingCNC milling, documentationLow (graphics only)
Gerber RS-274XPhotoplottingPCB fabricationLow-Medium
Gerber X2PhotoplottingPCB fabricationMedium (attributes)
ExcellonNC drillHole drillingLow
ODB++Manufacturing databaseComplete fabricationHigh
IPC-2581Manufacturing databaseComplete fabricationHigh

HPGL is what engineers call a “dumb” format—it contains only graphical instructions without electrical intelligence. Unlike Gerber files (which at least define aperture shapes), HPGL simply describes pen movements. There’s no netlist information, no layer definition beyond pen selection, and no component data.

This limitation is fine for plotting documentation or driving simple CNC operations, but it makes HPGL unsuitable for modern PCB fabrication where intelligent data exchange prevents manufacturing errors.

Working with HPGL Files

Viewing HPGL Files

Several tools can open and display HPGL files:

ToolPlatformCostFeatures
HPGL ViewerWindowsFreeView, rotate, convert to image formats
GC-PrevueWindowsFreePCB file viewer including HPGL
XnViewCross-platformFreeMulti-format viewer
ABViewerWindowsCommercialFull editing capabilities
CorelDRAWWindows/MacCommercialImport and edit as vectors
InkscapeCross-platformFreeImport via extensions

Converting HPGL to Other Formats

Common conversion scenarios include:

HPGL to G-code: For CNC machines that don’t accept HPGL directly, converters translate pen commands to tool movement instructions. Tools like HPGL-to-GCODE handle basic conversion.

HPGL to PDF/Image: HPGL viewers typically offer export to PDF, PNG, JPEG, or other standard formats for documentation purposes.

HPGL to DXF: CAD programs can often import HPGL and export to DXF for further editing or integration with mechanical designs.

Read more PCB Files format:

Generating HPGL from PCB Software

When exporting HPGL from your PCB design tool, consider these settings:

Coordinate Origin: Establish whether your origin is at the board corner or center. Mismatched origins cause alignment problems on CNC machines.

Scale Factor: HPGL uses 1016 units per inch by default. Verify your export settings match your target equipment’s expectations.

Pen Selection: Map your PCB layers to specific pen numbers if you’re plotting multiple layers or need different line weights.

Mirror Option: For bottom-side artwork, you may need to mirror the output depending on your manufacturing process.

Useful Resources for HPGL

Software Tools

ToolPurposeLink
HPGL ViewerFree file viewerhpglviewer.com
hp2xxHPGL converter (Linux/Unix)GNU project
ChiplotlePython HPGL libraryColumbia University
GC-PrevuePCB file viewergraphicode.com
InkscapeVector editing with HPGL importinkscape.org

Documentation and References

ResourceDescription
HP-GL/2 Reference GuideOfficial HP documentation
Wikipedia HP-GL ArticleFormat history and command reference
FileFormat.com HPGLTechnical format specification
PTC IsoDraw HelpHPGL import/export documentation

Online Converters

  • CloudConvert: Converts HPGL to various formats online
  • Convertio: Browser-based HPGL conversion
  • AnyConv: Free HPGL file converter

Frequently Asked Questions About HPGL

Can HPGL files be used for professional PCB fabrication?

Not for modern fabrication. Professional PCB manufacturers require Gerber RS-274X or intelligent formats like ODB++ or IPC-2581. HPGL lacks the precision, layer information, and aperture definitions needed for photolithographic imaging. However, HPGL works well for prototype isolation milling on CNC machines, documentation plotting, and driving legacy equipment.

What’s the difference between .plt and .hpgl file extensions?

Both extensions indicate HPGL files—they’re functionally identical. The .plt extension (for “plot”) is more common in CAD applications, while .hpgl is sometimes used for clarity. Some systems also use .hp, .hpg, or .hgl. The file contents and structure are the same regardless of extension.

Why do some CNC milling programs prefer HPGL over G-code?

HPGL’s pen-up/pen-down logic maps naturally to tool-up/tool-down operations in milling. The format is simpler than G-code, with fewer commands to implement. For 2D routing operations where you’re essentially “drawing” isolation channels, HPGL provides everything needed without G-code’s complexity. Many hobbyist and semi-professional PCB mills were designed around HPGL input from the start.

How do I view an HPGL file to verify it before milling?

The free HPGL Viewer application handles most HPGL files and lets you zoom, rotate, and inspect the plot before sending it to your machine. GC-Prevue is another free option that’s particularly good for PCB-related files. For quick checks, you can open the ASCII file in a text editor and review the coordinates, though visual verification is more practical for complex plots.

Is HPGL still being developed or updated?

No, HPGL development effectively ended with HP-GL/2 in the 1990s. HP has moved on to other printing technologies and formats. However, the format’s simplicity and universal support mean it continues serving niche applications where pen-plotter-style output makes sense. The specification is stable and well-documented, which actually helps long-term compatibility.

Conclusion

HPGL may seem like a relic from the pen-plotter era, but its simplicity keeps it useful for specific PCB applications. Whether you’re milling prototype boards on a desktop CNC, plotting large-format documentation, or interfacing with legacy manufacturing equipment, understanding HPGL helps you work effectively with these systems.

For modern PCB fabrication, stick with Gerber RS-274X or intelligent formats like ODB++ and IPC-2581. But when you need to drive a CNC mill, create plotter documentation, or convert files for legacy systems, HPGL remains a practical format that every PCB designer should understand.

The next time you see a .plt file in your output directory, you’ll know exactly what you’re dealing with—and how to use it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Sales & After-Sales Service

Contact & Quotation

  • Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.

  • Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.

Drag & Drop Files, Choose Files to Upload You can upload up to 3 files.

Notes:
For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.