Digital ANSI-Compliant Printing Protocol Level 2 Programming Reference Manual
Total Page:16
File Type:pdf, Size:1020Kb
Digital ANSI-Compliant Printing Protocol Level 2 Programming Reference Manual Order Number: EK–PPLV2–PM. B01 This document describes level 2 of Digital’s ANSI-Compliant Printing Protocol (DEC PPL2). It contains information pertaining to all level 2 printers. Revision/Update Information: This is a revised manual. Digital Equipment Corporation Maynard, Massachusetts First Printing, September 1991 Revised, August 1994 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. Any software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software or equipment that is not supplied by Digital Equipment Corporation or its affiliated companies. Restricted Rights: Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227–7013. © Digital Equipment Corporation 1991, 1994. All rights reserved. Printed in U.S.A. The Reader’s Comments form at the end of this document requests your critical evaluation to assist in preparing future documentation. The following are trademarks of Digital Equipment Corporation: DEC, DEClaser, LA50, LA70, LA75, LA310, LA600, LN01, LN03, LN03 PLUS, PrintServer, PrintServer 20, PrintServer 40, PrintServer 40 Plus, and the DIGITAL Logo. ANSI is a registered trademark of the American National Standards Institute, Inc. PCL is a registered trademark of Hewlett-Packard Company. IBM and Proprinter are registered trademarks of International Business Machines Corporation. PostScript is a registered trademark of Adobe Systems, Inc. S2695 This document was prepared using VAX DOCUMENT Version 2.1. Contents Preface . xi 1 Protocol Concepts 1.1 Levels of the Protocol . 1–1 1.2 Extensions and Exceptions to the Protocol . 1–2 1.3 Relationship to the Printing Environment . 1–2 2 Character Processing 2.1 Coded Characters . 2–2 2.2 Printable Characters . 2–6 2.2.1 Selecting Graphic Character Sets . 2–6 2.2.2 Line Terminators . 2–7 2.3 Control Characters . 2–8 2.4 Special Characters . 2–9 2.4.1 Processing 2/0 . 2–9 2.4.2 Processing 7/15 . 2–10 2.4.3 Processing 10/0 . 2–10 2.4.4 Processing 15/15 . 2–10 2.5 Control Functions . 2–10 2.5.1 Escape Sequence Format . 2–10 2.5.2 Control Sequence Format . 2–11 2.5.2.1 Parameter Values in Control Sequences . 2–12 2.5.2.2 Private Parameters . 2–13 2.5.2.3 Selectable Modes . 2–14 2.5.3 Control Strings . 2–14 2.5.3.1 Device Control String (DCS) Format . 2–15 2.5.3.2 Application Program Command, Operating System Command, and Privacy Message Control Strings . 2–15 2.5.4 Special Parsing Requirements . 2–16 iii 3 Page Coordinate System 3.1 Coordinate System Models . 3–1 3.1.1 Character Cell Model . 3–2 3.1.2 Point Model . 3–2 3.1.3 Conformance to Models . 3–2 3.1.4 Origin and Extent . 3–2 3.2 Positioning and Movement . 3–3 3.2.1 Advance Increments . 3–3 3.2.1.1 HAI . 3–3 3.2.1.2 VAI . 3–3 3.2.2 Positioning Control Functions . 3–3 3.3 Bounds . 3–5 3.3.1 Left Margin Position . 3–6 3.3.2 Right Margin Position . 3–6 3.3.3 Top Margin Line . 3–7 3.3.4 Bottom Margin Line . 3–8 3.4 Mapping Logical Page to Physical Sheet . 3–8 3.5 Partial Line Motion (PLU and PLD) . 3–9 3.6 Side Effects of Positioning Controls . 3–9 3.7 Tabs . 3–10 3.8 Conditional Form Feed . 3–11 3.9 Conditional Sheet Feed . 3–11 4 Fonts 4.1 Character Sets . 4–1 4.2 Fonts . 4–1 4.3 Font Repertory . 4–2 4.3.1 Font Cartridges . 4–2 4.3.2 Downloaded Fonts . 4–3 4.3.3 Supported Character Sets . 4–3 4.4 Font Selection Process . 4–4 4.4.1 Font Dictionary . 4–4 4.4.2 Current Font Definition (CFD) . 4–4 4.4.3 Font Selection and Fallbacks . 4–5 iv 5 Sixel Graphics 5.1 Terminology and Concepts . 5–1 5.2 Converting Sixel Data . 5–3 5.3 Selecting Sixel Graphics Mode . 5–3 5.4 Protocol Structure . 5–4 5.4.1 Protocol Selector — Formatting Information . 5–4 5.4.1.1 Ps1 . 5–5 5.4.1.2 Ps2 . 5–5 5.4.1.3 Pn3 . 5–5 5.4.1.4 q — Sixel Graphics Protocol Selector Final . 5–6 5.4.2 Picture Data . 5–6 5.4.3 String Terminator . 5–6 5.5 Character Processing in Sixel Graphics Mode . 5–6 5.5.1 Sixel Printable Characters . 5–6 5.5.2 Sixel Graphics Control Codes . 5–8 5.5.3 Parameters . 5–9 5.5.4 Parameter Separator . 5–9 5.5.5 Exiting Sixel Graphics Mode . 5–9 5.6 Sixel Graphics and Text Interactions . 5–10 5.6.1 State upon Entering Sixel Graphics Mode . 5–10 5.6.2 Interaction with Text Margins . 5–10 5.6.3 State After Exiting Sixel Graphics Mode . 5–10 5.7 Graphics Programming Considerations . 5–10 5.7.1 Parameter Usage and Interactions . 5–11 5.7.2 Compatibility . 5–11 5.7.3 Quality . 5–12 5.7.4 Compatibility or Quality . 5–12 5.8 Sixel Control Codes . 5–12 DECGCI ( # ) — Graphics Color Introducer . 5–13 DECGCR ( $ ) — Graphics Carriage Return . 5–22 DECGNL ( - ) — Graphics Next Line . 5–23 DECGRA ( " ) — Set Raster Attributes . 5–24 DECGRI ( ! ) — Graphics Repeat Introducer . 5–26 v 6 Control Characters 6.1 Control Characters . 6–1 6.2 C0 Control Characters . 6–1 6.3 C1 Control Characters . 6–5 7 Command Dictionary ASCEF — Announce Subset of Code Extension Facilities . 7–6 CRM — Control Representation Mode . 7–7 DA — Device Attributes . 7–9 DAR (generic response) — Device Attributes Report . 7–10 DAR (alias response) — Device Attributes Report . 7–12 DA2 — Secondary Device Attributes . ..