Postscript Language Reference Manual / Adobe Systems
Total Page:16
File Type:pdf, Size:1020Kb
See also cross-references: abcdefghijklmnopqrltuvw PLRM 2nd Edition July 27, 1992 PostScript® Language Reference Manual SECOND EDITION Adobe Systems Incorporated Addison-Wesley Publishing Company, Inc. Reading, Massachusetts • Menlo Park, California • New York Don Mills, Ontario • Wokingham, England • Amsterdam Bonn • Sydney • Singapore • Tokyo • Madrid • San Juan PLRM 2nd Edition July 27, 1992 Library of Congress Cataloging-in-Publication Data PostScript language reference manual / Adobe Systems. — 2nd ed. p. cm. Includes index. ISBN 0-201-18127-4 1. PostScript (Computer program language) I. Adobe Systems. QA76.73.P67P67 1990 005.13’3—dc20 90-43535 Copyright © 1985, 1986, 1987, 1988, 1990 Adobe Systems Incorporated. All Rights Reserved. Patents Pending. No part of this publication may be repro- duced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated and Addison-Wesley Publish- ing Company, Inc. Printed in the United States of America. Published simultaneously in Canada. The information in this book is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsi- bility or liability for any errors or inaccuracies that may appear in this book. The software described in this book is furnished under license and may only be used or copied in accordance with the terms of such license. The name PostScript is a registered trademark of Adobe Systems Incorporated. All instances of the name PostScript in the text are references to the PostScript language as defined by Adobe Systems Incorporated unless otherwise stated. The name PostScript also is used as a product trademark for Adobe Systems’ imple- mentation of the PostScript language interpreter. Any references to a “PostScript printer,” a “PostScript file,” or a “PostScript driver” refer to printers, files, and driver programs (respectively) which are writ- ten in or support the PostScript language. The sentences in this book that use “PostScript language” as an adjective phrase are so constructed to reinforce that the name refers to the standard language definition as set forth by Adobe Systems Incorporated. PostScript, the PostScript logo, Display PostScript, Adobe, the Adobe logo, Adobe Illustrator, TranScript, Carta, and Sonata are trademarks of Adobe Systems Incor- porated registered in the U.S. Adobe Garamond and Lithos are trademarks of Adobe Systems Incorporated. QuickDraw and LocalTalk are trademarks and Mac- intosh and LaserWriter are registered trademarks of Apple Computer, Inc. FrameMaker is a registered trademark of Frame Technology Corporation. ITC Stone is a registered trademark of International Typeface Corporation. IBM is a registered trademark of International Business Machines Corporation. Helvetica, Times, and Palatino are trademarks of Linotype AG and/or its subsidiaries. Microsoft and MS-DOS are registered trademarks and Windows is a trademark of Microsoft Corporation. Times New Roman is a registered trademark of The Monotype Corporation plc. NeXT is a trademark of NeXT, Inc. Sun-3 is a trade- mark of Sun Microsystems, Inc. UNIX is a registered trademark of AT&T Information Systems. X Window System is a trademark of the Massachusetts Institute of Technology. Other brand or product names are the trademarks or reg- istered trademarks of their respective holders. ABCDEFGHIJ-MW-90 First printing, December 1990 PLRM 2nd Edition January 27, 1994 Contents Preface vii Chapter 1: Introduction 1 1.1 About This Manual 3 1.2 Evolution of the PostScript Language 5 1.3 PostScript Level 2 Overview 7 1.4 Copyrights and Trademarks 9 Chapter 2: Basic Ideas 11 2.1 Raster Output Devices 11 2.2 Scan Conversion 12 2.3 Page-Description Languages 13 2.4 Using the PostScript Language 16 Chapter 3: Language 23 3.1 Interpreter 24 3.2 Syntax 25 3.3 Data Types and Objects 33 3.4 Stacks 43 3.5 Execution 45 3.6 Overview of Basic Operators 50 3.7 Memory Management 55 3.8 File Input and Output 71 3.9 Named Resources 85 3.10 Errors 99 3.11 Early Name Binding 101 3.12 Binary Encoding Details 105 3.13 Filtered Files Details 122 i PLRM 2nd Edition January 27, 1994 Chapter 4: Graphics 143 4.1 Imaging Model 144 4.2 Graphics State 146 4.3 Coordinate Systems and Transformations 150 4.4 Path Construction 157 4.5 Painting 160 4.6 User Paths 164 4.7 Forms 172 4.8 Color Spaces 176 4.9 Patterns 200 4.10 Images 210 4.11 Device Setup 226 Chapter 5: Fonts 257 5.1 Organization and Use of Fonts 257 5.2 Font Dictionaries 264 5.3 Character Encoding 269 5.4 Font Metric Information 271 5.5 Font Cache 274 5.6 Modifications to Existing Fonts 275 5.7 Type 3 Fonts 278 5.8 Unique ID Generation 283 5.9 Composite Fonts 285 Chapter 6: Rendering 293 6.1 CIE-Based Color to Device Color 294 6.2 Conversions Among Device Color Spaces 303 6.3 Transfer Functions 307 6.4 Halftones 309 6.5 Scan Conversion Details 320 Chapter 7: Display PostScript 325 7.1 Multiple Execution Contexts 326 7.2 Encoded User Names 332 7.3 Graphics and Window Systems 334 7.4 Bitmap Fonts 339 Chapter 8: Operators 343 8.1 Operator Summary 346 8.2 Operator Details 360 ii Contents PLRM 2nd Edition January 27, 1994 Appendix A: Changes to Language and Implementation 555 A.1 Language Extensions 555 A.2 Language Changes Affecting Existing Operators 560 A.3 Implementation and Documentation Changes 562 Appendix B: Implementation Limits 565 B.1 Typical Limits 566 B.2 Virtual Memory Use 569 Appendix C: Interpreter Parameters 571 C.1 Defined User and System Parameters 572 C.2 General Properties of User and System Parameters 574 C.3 Parameter Details 576 C.4 Device Parameters 579 Appendix D: Compatibility Strategies 581 D.1 The Level Approach 581 D.2 When To Provide Compatibility 582 D.3 Compatibility Techniques 585 D.4 Installing Emulations 588 Appendix E: Standard Character Sets and Encoding Vectors 591 E.1 Times Family 592 E.2 Helvetica Family 593 E.3 Courier Family 594 E.4 Symbol 595 E.5 Standard Roman Character Set 596 E.6 StandardEncoding Encoding Vector 598 E.7 ISOLatin1Encoding Encoding Vector 599 E.8 Expert Character Set 600 E.9 Expert Encoding Vector 602 E.10 ExpertSubset Encoding Vector 603 E.11 Symbol Character Set 604 E.12 Symbol Encoding Vector 606 Appendix F: System Name Encodings 607 Contents iii PLRM 2nd Edition January 27, 1994 Appendix G: Document Structuring Conventions—Version 3.0 611 G.1 Using the Document Structuring Conventions 613 G.2 Document Manager Services 614 G.3 DSC Conformance 620 G.4 Document Structure Rules 624 G.5 General Conventions 639 G.6 Requirement Conventions 658 G.7 Color Separation Conventions 685 G.8 Query Conventions 688 G.9 Open Structuring Conventions 696 G.10 Special Structuring Conventions 698 G.11 Changes Since Earlier Versions 699 G.12 DSC Version 3.0 Summary 706 Appendix H: Encapsulated PostScript File Format—Version 3.0 709 H.1 Introduction 709 H.2 Guidelines for Creating EPS Files 712 H.3 Guidelines for Importing EPS Files 718 H.4 File Types and Naming 727 H.5 Device-Specific Screen Preview 728 H.6 Device-Independent Screen Preview 730 H.7 EPS Example 733 H.8 Changes Since Version 2.0 735 Appendix I: Guidelines for Specific Operators 737 Bibliography 745 Index 747 iv Contents PLRM 2nd Edition January 27, 1994 Preface Preface It has been only five years since the first PostScript Language Reference Manual was published and the first products based on the PostScript language were introduced. In 1985, we had no reason to anticipate the far-reaching effects that the PostScript language would have on the printing and publishing industry. At that time, there were no effective page-description standards, popular typefaces were used only with spe- cific typesetting equipment, producing high-quality visual materials was restricted to specialists, and the cost of producing most corporate communication pieces was prohibitive. In its brief history, the PostScript language and the many corporations and individuals working with PostScript products have changed all that. Today all major computer, printer, and imagesetter vendors sup- port the PostScript language as a standard. The major type libraries are becoming available in PostScript-compatible formats. The cost of pro- ducing high-quality, printed material has dropped substantially. As a result, the PostScript language is becoming a part of the basic fabric of the printing, publishing, and computing industries. We at Adobe not only take great pride in this success, but more impor- tantly, we feel a significant responsibility to those who have placed their trust in us and in this technology. We are committed to enhancing the PostScript language standard so that we can continue to earn that trust. In developing this language, we have tried to remember that PostScript is only one advancement in the rich 500-year history of printing and typography. We are constantly sensitive to the fact that we are working with a delicate combination of art, tradition, and technology. Not only must the technological effectiveness of the PostScript language be improved, but our aspiration to provide the highest-quality printed results must be preserved and enhanced in each implementation of a PostScript product. v PLRM 2nd Edition January 27, 1994 Preface Any standard, if it is to continue to serve the community in the face of technological change, must grow and adapt; the PostScript language is no exception. We hope that you, the users, will find that this second edition of the PostScript Language Reference Manual incorporates many of the ideas you have given us.