home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / Documents / FAQ / PostScript-faq / part7-10 < prev    next >
Encoding:
Text File  |  1993-08-27  |  29.7 KB  |  817 lines

  1. Newsgroups: comp.lang.postscript,comp.answers,news.answers
  2. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!brunix!doorknob!jgm
  3. From: jgm@cs.brown.edu (Jonathan Monsarrat)
  4. Subject: PostScript monthly FAQ v2.1 05-21-93 [07-10 of 11]
  5. Message-ID: <JGM.93Aug26102956@vegas.cs.brown.edu>
  6. Followup-To: poster
  7. Summary: Useful facts about the PostScript graphics programming language
  8. Sender: news@cs.brown.edu
  9. Supersedes: <JGM.93Apr16124412@vegas.cs.brown.edu>
  10. Reply-To: jgm@cs.brown.edu (PostScript FAQ comments address)
  11. Organization: Brown University Department of Computer Science
  12. Date: Thu, 26 Aug 1993 15:29:56 GMT
  13. Approved: news-answers-request@MIT.Edu
  14. Expires: Mon, 27 Sep 1993 00:00:00 GMT
  15. Lines: 799
  16. Xref: senator-bedfellow.mit.edu comp.lang.postscript:20192 comp.answers:1747 news.answers:11812
  17.  
  18. Archive-name: postscript/faq/part7-10
  19. Last-modified: 1993/05/21
  20. Version: 2.1
  21.  
  22.                               -- PostScript -- 
  23.  
  24.                             Answers to Questions 
  25.  
  26.                     (the comp.lang.postscript FAQ v2.1) 
  27.  
  28.                                Jon Monsarrat 
  29.  
  30.                               jgm@cs.brown.edu 
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                      This FAQ is formatted as a digest. 
  38.  
  39.                 Most news readers can skip from one question 
  40.  
  41.                      to the next by pressing control-G. 
  42.  
  43.  
  44.     Changes since the last version are marked with a '|' in the table 
  45.     of contents and in the sections in the text-only format of the FAQ. 
  46.  
  47.     Now that there is Linux and BSD 386 UNIX IBM PC (and clone) users 
  48.     can run any of the X-windows and UNIX programs in the utilities 
  49.     section. See comp.os.linux. Also, there is now GhostScript for the 
  50.     Macintosh. 
  51.  
  52.     Section 12, Utilities, will be posted in comp.sources.postscript 
  53.     along with the global index from now on. 
  54.  
  55.     Please help fix the FAQ! All comments should be mailed to 
  56.     jgm@cs.brown.edu. My favorite way to receive a change suggestion is 
  57.     when it is accompanied by a section of the FAQ that is edited and 
  58.     mailed to me verbatim as an example. If you would like to 
  59.     contribute, please read the section ``about the FAQ'' first. Thank 
  60.     you! 
  61.  
  62.     Books and programs are referred to by name only. See the book
  63.     sections for book information, and the comp.sources.postscript FAQ
  64.     for a full list of all PostScript related programs. I have
  65.     archived a number of the small utilities in
  66.     wilma.cs.brown.edu:pub/postscript.  You can get the
  67.     comp.sources.postscript FAQ from
  68.     wilma.cs.brown.edu:pub/comp.sources.postscript.
  69.  
  70. Subject: 7 Programming in PostScript 
  71.  
  72.  
  73. Subject: 7.1 What is PostScript level 2? 
  74.  
  75.     (See the Section 11, ``About PostScript 2''.) 
  76.  
  77.  
  78. Subject: 7.2 Should I learn level 2 PostScript? 
  79.  
  80.     Yes, because Level Two will soon become the standard. Application 
  81.     developers using PostScript need to become aware of the new 
  82.     capabilities and how to take advantage of them. 
  83.  
  84.     There are many good books on PostScript 2. (See Section 5, 
  85.     ``Books''.) 
  86.  
  87.  
  88. Subject: 7.3 Where can I find examples of PostScript code? 
  89.  
  90.     Many other books on PostScript make example PostScript code 
  91.     available. ``Thinking in PostScript'', by Glenn Reid, is the only 
  92.     book I know of that allows its examples to be freely distributed. 
  93.     (See Section 5, ``Books''.) 
  94.  
  95.     All the examples in ``the blue book'' are available from the Adobe 
  96.     file server (See Section 5, ``Books''.) 
  97.  
  98.     See the question ``How can I browse through PostScript programs?'' 
  99.     in the comp.sources.postscript FAQ. 
  100.  
  101.  
  102. Subject: 7.4 How do I get the physical size of a page? 
  103.  
  104.     The initial clipping path gives you the size of the imagable area. 
  105.     Use ``clippath pathbbox'' to get these coordinates. If you must 
  106.     know the size of the device's imageable area, use the sequence 
  107.     ``gsave initclip clippath pathbbox grestore'', but this will 
  108.     prevent an enclosing application from using the clippath to achieve 
  109.     some special effects (such as multiple pages per page). 
  110.  
  111.  
  112. Subject: 7.5 Why can't I do a pathforall after a charpath ? 
  113.  
  114.     (See Section 4, ``Fonts'', question ``Why are Adobe fonts 
  115.     hidden?''.) 
  116.  
  117.  
  118. Subject: 7.6 How do I center a string of text around a point? 
  119.  
  120.     Level 1 PostScript has two operators that can extract information 
  121.     about the metrics of characters: ``stringwidth'' and ``charpath''. 
  122.  
  123.     The ``stringwidth'' operator returns the advance width of its 
  124.     string operand. This is the distance the current point would be 
  125.     moved by a ``show'' operation on the same string. ``stringwidth'' 
  126.     returns two numbers on the stack, representing the x and y 
  127.     components of the advance width. Usually the y component is zero 
  128.     because most fonts are displayed along a horizontal line, moving 
  129.     the current point only in the x direction. 
  130.  
  131.     Also note that the ``stringwidth'' usually does not give an exact 
  132.     measure of the area of the page that will be touched by its 
  133.     operand. The letters can either project a little over the 
  134.     boundaries or fall a little within (leaving a touch of whitespace). 
  135.  
  136.     If all that an application requires is horizontal centering of a 
  137.     long string of text, the result returned by ``stringwidth'' is 
  138.     sufficient. A common technique is 
  139.  
  140.   
  141.           x y moveto
  142.           (string) dup stringwidth pop 2 div neg 0 rmoveto show
  143.   
  144.     (This code makes the assumption that the y component of advance 
  145.     width is irrelevant.) 
  146.  
  147.     The ``charpath'' operator extracts the graphic shapes of its string 
  148.     operand and appends them to the current path in the graphic state. 
  149.     These shapes can then be processed by other PostScript operators. 
  150.     To get the actual size of the area touched by a character a simple 
  151.     approach is 
  152.  
  153.   
  154.           gsave
  155.           newpath
  156.           0 0 moveto
  157.           (X) false charpath flattenpath pathbbox
  158.           grestore
  159.   
  160.     This code places four numbers on the stack, representing the 
  161.     coordinates of the lower left and upper right corners of the 
  162.     bounding box enclosing the character ``X'' rendered with the 
  163.     current point at (0,0). Leaving the flattenpath out will cause it 
  164.     to be less accurate, but it will take up less memory and be faster. 
  165.  
  166.     There are two things to be careful about when using the code shown 
  167.     above: 
  168.  
  169.  
  170.  
  171.    1. There are severe limits on the size of the string operand, 
  172.       related to the limit on the number of elements in a graphic path. 
  173.       The PostScript Language Reference Manual recommends taking 
  174.       ``charpath''s one character at a time. 
  175.  
  176.  
  177.    2. If user space is rotated or skewed with respect to device space, 
  178.       the result from ``pathbbox'' may be larger than expected; 
  179.       ``pathbbox'' returns a rectangle oriented along the user space 
  180.       coordinate axes, which fully encloses a (possibly smaller) 
  181.       rectangle oriented along the coordinate axes of device space. If 
  182.       user space is rotated at an integer multiple of 90 degrees these 
  183.       two rectangles will be the same, otherwise the rectangle in user 
  184.       space will be larger. 
  185.  
  186.     So, to center text vertically one must get the bounding boxes of 
  187.     all the characters in the string to be displayed, find the minimum 
  188.     and maximum y coordinate values, and use half the distance between 
  189.     them to displace the text vertically. This still may not do a very 
  190.     good job, since this provides centering based on extrema, not on 
  191.     the optical center of the string (which is more related to a sort 
  192.     of ``center of mass'' of the text). 
  193.  
  194.     If an application does this repeatedly, it would be wise to store 
  195.     the bounding boxes in an array indexed by character code, since 
  196.     ``charpath'' is a slow operation. 
  197.  
  198.     Font metric information is available outside of a PostScript 
  199.     printer in font metrics files, available from the font vendor. A 
  200.     program generating PostScript output can obtain metrics from these 
  201.     files rather than extracting the metrics in the printer. 
  202.  
  203.  
  204. Subject: 7.7 How can I concatenate two strings together? 
  205.  
  206.   
  207.   %% string1 string2 append string
  208.   % Function: Concatenates two strings together.
  209.   /append {
  210.            2 copy length exch length add  % find the length of the new.
  211.            string dup     % string1 string2 string string
  212.            4 2 roll       % string string string1 string2
  213.            2 index 0 3 index
  214.            % string string string1 string2 string 0 string1
  215.            putinterval    % stuff the first string in.
  216.            % string string string1 string2
  217.            exch length exch putinterval
  218.   } bind def
  219.   
  220.  
  221. Subject: 7.8 What do I do when I get stack overflow/underflow? 
  222.  
  223.     These errors are among the most common in PostScript. 
  224.  
  225.     When I get a stack overflow, that is usually a sign that a routine 
  226.     is leaving an object on the stack. If this routine gets called 2000 
  227.     times, it leaves 2000 objects on the stack, which is too many. 
  228.  
  229.     When I get a stack underflow, that is a sign that either: (A) one 
  230.     of the routines in the program doesn't work, and never has or (B) 
  231.     one of the routines in the program works, but expects to be called 
  232.     with some arguments left on the stack. 
  233.  
  234.     There is no such thing as a PostScript debugger right now. For now, 
  235.     the best that you can do to debug your program is to put in lots of 
  236.     print statements. Learn to use the PostScript pstack command, and 
  237.     use an online interpreter so you don't have to run to the printer 
  238.     for each debugging cycle. 
  239.  
  240.     Use an error handler to learn more about what exactly is happening 
  241.     when your program crashes. (see the comp.sources.postscript FAQ for 
  242.     a list of all PostScript related programs.) 
  243.  
  244.     If your code has never worked yet (i.e. you are still writing it) 
  245.     then I find that it helps to put little comments in the margin 
  246.     about the state of the stack. Like this: 
  247.  
  248.   
  249.          Heart pathbbox             % lowerx lowery upperx uppery
  250.          exch 4 -1 roll             % lowery uppery upperx lowerx
  251.   
  252.   
  253.     I generally put these comments in originally, and then take them 
  254.     out when the program works. Maybe this is a bad practice, in case I 
  255.     ever want to go back and look at the code to modify it!! 
  256.  
  257.  
  258. Subject: 7.9 How can I print in landscape mode? 
  259.  
  260.     Landscape (the opposite of portrait) means that the page is turned 
  261.     on its side. You can redefine showpage in terms of the current 
  262.     definition of showpage. 
  263.  
  264.     Do something like: 
  265.  
  266.   
  267.   /oldshowpage /showpage load def
  268.   
  269.   90 rotate llx neg ury neg translate   % for the first page
  270.   /showpage
  271.   {
  272.           oldshowpage
  273.           90 rotate llx neg ury neg translate
  274.   } def
  275.   
  276.     This won't work if the PostScript file you're editing uses 
  277.     initgraphics or grestoreall. 
  278.  
  279. Subject: 8 Computer-specific PostScript 
  280.  
  281.     This section describes PostScript information specific to a 
  282.     particular type of computer or operating system. 
  283.  
  284.  
  285. Subject: 8.1 Sun Workstations 
  286.  
  287.     What is NeWS? 
  288.  
  289.     NeWS is Sun Microsystems PostScript-based window system for the Sun 
  290.     Workstation. NeWS was a project within Sun (started around 1985) to 
  291.     create a window system to supplant SunView (a very successful 
  292.     kernel-based window system). NeWS is a client-server model window 
  293.     system (like X) but among many of NeWS novel features was the use 
  294.     of PostScript as the language to describe the appearance of objects 
  295.     on the screen. NeWS has many features in common with Display 
  296.     PostScript, but NeWS predates Adobe Display PostScript and was 
  297.     neither connected with Adobe Display PostScript nor endorsed by 
  298.     Adobe. NeWS is not an Adobe product, nor is it a Sun/Adobe joint 
  299.     venture. 
  300.  
  301.     As of October 1992, Sun management signed a deal with Adobe to 
  302.     adopt Display PostScript for the Sun. The future of NeWS is still 
  303.     undecided (but it looks bad). 
  304.  
  305.     And how does PostScript run on them? 
  306.  
  307.     PostScript runs on NeWS, although NeWS is not a fully-compliant 
  308.     PostScript interpreter. There were incompatibilities between the 
  309.     NeWS PostScript interpreter and ``official'' PostScript 
  310.     interpreters as defined by Adobe and the Apple LaserWriter family 
  311.     of printers, such that many PostScript files which would print fine 
  312.     on a LaserWriter would not render under NeWS. The most critical 
  313.     incompatibility was the lack of support for Adobe Type 1 fonts, Sun 
  314.     having gone with their own font format known as F3. 
  315.  
  316.  
  317. Subject: 8.2 IBM PC 
  318.  
  319.     You can find nenscript for OS/2 1.x--2.0 and MSDOS on 
  320.     ftp-os2.nmsu.edu in pub/uploads/nensc113.zip. 
  321.  
  322.     There are rumors that Word Perfect and Microsoft Word don't produce 
  323.     ``clean'' PostScript that follows the DSC conventions (See Section 
  324.     9, ``Encapsulated PostScript''). This means that a lot of 
  325.     PostScript utilities like Ghostview and psnup, etc., that require 
  326.     the DSC conventions, will not work on them. 
  327.  
  328.     Creating a PostScript file from MS Word 
  329.  
  330.     Install the LaserWriter driver that comes with Windows.In the 
  331.     printer setup, select a PostScript printer. Then click on the setup 
  332.     button to get that pop-up. Then clik the Options button. Then 
  333.     select the print to Encapsulated PostScript File. If you don't 
  334.     specify a file name, Word will prompt you for one when you tell it 
  335.     to print. 
  336.  
  337.     When printing Microsoft Windows files that have been captured on a 
  338.     PC's LPT port, you mostly need to define two ctrl-d's in a row as 
  339.     well to remove all of them in the document: 
  340.  
  341.   
  342.   (\004\004) cvn {} def
  343.   
  344.  
  345. Subject: 8.3 Apple Macintosh 
  346.  
  347.     For more details about printing with the Macintosh, read the 
  348.     comp.sys.mac.apps FAQ. 
  349.  
  350.     How can I convert a PostScript file created with a UNIX program to 
  351.     the Mac? 
  352.  
  353.     A way that is clumsy, but works, is this: 
  354.  
  355.  
  356.  
  357.    1. Display the UNIX-based PostScript file on screen 
  358.  
  359.  
  360.    2. Use window dumping facility to get a bitmap file 
  361.  
  362.  
  363.    3. Convert the above bitmap file to TIFF format and then export it 
  364.       to Adobe Illustrator on the Mac. 
  365.  
  366.     The PostScript section of the FAQ for the Macintosh newsgroup 
  367.     comp.sys.mac.app (maintained by Elliotte Harold) answers the 
  368.     following questions: 
  369.  
  370.  
  371.  
  372.     * How do I make a PostScript file? 
  373.  
  374.  
  375.     * How do I print a PostScript file? 
  376.  
  377.  
  378.     * Why won't my PostScript file print on my mainframe's printer? 
  379.  
  380.       Full documentation of this process provided with a utility called 
  381.       macps. 
  382.  
  383.  
  384.     * Why are my PostScript files so big? 
  385.  
  386.  
  387. Subject: 9 Encapsulated PostScript 
  388.  
  389.  
  390. Subject: 9.1 What is Encapsulated PostScript? 
  391.  
  392.     Encapsulated PostScript (EPS) is a standard format for importing 
  393.     and exporting PostScript language files in all environments. It is 
  394.     usually a single page PostScript language program that describes an 
  395.     illustration. The purpose of the EPS file is to be included as an 
  396.     illustration in other PostScript language page descriptions. The 
  397.     EPS file can contain any combination of text, graphics, and images. 
  398.     An EPS file is the same as any other PostScript language page 
  399.     description, with some restrictions. 
  400.  
  401.     EPS files can optionally contain a bitmapped image preview, so that 
  402.     systems that can't render PostScript directly can at least display 
  403.     a crude representation of what the graphic will look like. There 
  404.     are three preview formats: Mac (PICT), IBM (tiff), and a platform 
  405.     independent preview called EPSI. 
  406.  
  407.     An EPS file must be a conforming file, that is, it must conform to 
  408.     the Adobe Document Structuring Conventions (DSC). At a minimum, it 
  409.     must include a header comment,%!PS-Adobe-3.0 EPSF-3.0, and a 
  410.     bounding box comment,%%BoundingBox: llx lly urx ury, that 
  411.     describes the bounds of the illustration. 
  412.  
  413.     (The specification does not require the EPSF version, but many 
  414.     programs will reject a file that does not have it.) 
  415.  
  416.     The EPS program must not use operators that initialize or 
  417.     permanently change the state of the machine in a manner that cannot 
  418.     be undone by the enclosing application's use of save and restore 
  419.     (eg. the operators starting with ``init'' like initgraphics). As a 
  420.     special case, the EPS program may use the showpage operator. The 
  421.     importing application is responsible for disabling the normal 
  422.     effects of showpage. 
  423.  
  424.     The EPS program should make no environment-sensitive decisions (the 
  425.     importing application may be trying to attain some special effect, 
  426.     and the EPS program shouldn't screw this up), although it can use 
  427.     some device-dependent tricks to improve appearance such as a 
  428.     snap-to-pixel algorithm. 
  429.  
  430.     The complete EPS specification is available from Adobe (see the 
  431.     section on Adobe). Read Appendix G (Document Structuring 
  432.     Conventions, V3.0) and Appendix H (Encapsulated PostScript File 
  433.     Format, V3.0) in the new PostScript red book: PostScript Language 
  434.     Reference Manual, Second Edition. 
  435.  
  436.     An optional component of an EPS file is a ``preview'' image of the 
  437.     file's content. The preview image is a bitmapped representation of 
  438.     the image which may be displayed by programs using the EPS file 
  439.     without having to actually interpret the PostScript code. 
  440.  
  441.     The recommended form for a preview image is ``Interchange'' format 
  442.     and is described fully in the ``red book'', second edition. 
  443.     Interchange format represents the image as a series of hex strings 
  444.     placed in the EPS file as PostScript comments. The entire file 
  445.     remains an ASCII file. 
  446.  
  447.     That book contains all of the information that you need to fix your 
  448.     program to correctly output EPS. It is what I use for our software. 
  449.  
  450.     A variation of EPS embeds the preview image and PostScript text in 
  451.     a binary file which contains a header and the preview image in 
  452.     either a TIFF or MetaFile format. The header defines where in the 
  453.     file each section (EPS, TIFF, or MetaFile) starts and ends. On the 
  454.     Macintosh, the preview is stored as a PICT in the file's resource 
  455.     fork. 
  456.  
  457.  
  458. Subject: 9.2 What are EPSI and EPSF? 
  459.  
  460.     EPSI is EPS with a device independent bitmap preview. EPSI is an 
  461.     all ASCII (no binary data or headers) version of EPS. EPSI provides 
  462.     for a hexadecimal encoded preview representation of the image that 
  463.     will be displayed or printed. 
  464.  
  465.     EPSF is a version of EPS with a TIFF preview instead of a bitmap 
  466.     preview. 
  467.  
  468.  
  469. Subject: 9.3 How do I convert PostScript to EPS? 
  470.  
  471.     Use pstoepsi, or do it by hand. 
  472.  
  473.     To convert from PostScript to EPS, one must guarantee that the 
  474.     PostScript file meets the above requirements. If the actual program 
  475.     conforms to the programming requirements, then one can simply add 
  476.     the required comments at the top of the file saying that the file 
  477.     is EPS and giving its BoundingBox dimensions. 
  478.  
  479.     Optional comments include font usage (%%DocumentFonts: or%% 
  480.     DocumentNeededResources: font), EPSI preview comments (%% 
  481.     Begin(End)Preview:) extensions (%%Extensions:) and language 
  482.     level (%%LanguageLevel:). 
  483.  
  484.     There are some operators that should not be used within an EPS 
  485.     file: 
  486.  
  487.   
  488.           banddevice     cleardictstack   copypage     erasepage
  489.           exitserver     framedevice      grestoreall  initclip
  490.           initgraphics   initmatrix       quit         renderbands
  491.           setglobal      setpagedevice    setshared    startjob
  492.   
  493.     These also include operators from statusdict and userdict operators 
  494.     like legal, letter, a4, b5, etc. 
  495.  
  496.     There are some operators that should be carefully used: 
  497.   
  498.           nulldevice     setgstate        sethalftone  setmatrix
  499.           setscreen      settransfer      undefinefont
  500.   
  501.     To convert a PostScript file to EPS format, you must edit the file 
  502.     using a text editor or word processor to add lines that will define 
  503.     the file as an EPS-format file. 
  504.  
  505.  
  506.  
  507.    1. Using your normal method of printing, print the PostScript file 
  508.       to a PostScript printer. You can choose to view it on the screen 
  509.       instead, but keep in mind that all the below distance 
  510.       measurements assume that you are printing on a normal-sized piece 
  511.       of paper. 
  512.  
  513.       NOTE: If the PostScript image does not get displayed properly, it 
  514.       probably will not work either once you have converted it to EPS 
  515.       format. Correct the PostScript program so that it works before 
  516.       you convert it to EPS format. 
  517.  
  518.  
  519.    2. Use a tool (see below) to find the bounding box, which shows how 
  520.       much space the PostScript image occupies when printed. You 
  521.       specify the dimensions of the bounding box when you convert the 
  522.       PostScript file to EPS format. 
  523.  
  524.  
  525.    3. If you don't have a bounding box tool, you can just use a ruler 
  526.       and draw one on your printout. With two horizontal lines and two 
  527.       vertical lines, draw a box around the image that includes the 
  528.       entire image while minimizing white space. 
  529.  
  530.       This box represents your bounding box. You may want to leave a 
  531.       small amount of white space around the image as a precautionary 
  532.       measure against minor printing problems, such as paper stretching 
  533.       and paper skewing. 
  534.  
  535.  
  536.    4. Measure distance ``a'' from the lower-left corner of the image to 
  537.       the left edge of the paper. 
  538.  
  539.  
  540.    5. Write the measurement in points. If your ruler does not show 
  541.       points, calculate the total number of points: 1 inch = 72 points, 
  542.       1 cm = 28.3 points, and 1 pica = 12 points. Designate this 
  543.       measurement as ``measurement a.'' 
  544.  
  545.  
  546.    6. Measure distance ``b'' from the lower-left corner of the image to 
  547.       the bottom edge of the paper. 
  548.  
  549.       Designate this measurement in points as ``measurement b.'' 
  550.  
  551.  
  552.    7. Measure distance ``c'' from the upper-right corner of the image 
  553.       to the left edge of the paper. 
  554.  
  555.       Designate this measurement in points as ``measurement c.'' 
  556.  
  557.  
  558.    8. Measure distance ``d' from the upper-right corner of the image to 
  559.       the bottom edge of the paper. 
  560.  
  561.       Designate this measurement in points as ``measurement d.'' 
  562.  
  563.  
  564.    9. Using any text editor, open the PostScript file for editing. 
  565.  
  566.       You'll see several lines of text. These lines are the PostScript 
  567.       description of the image. The lines at the top of the file are 
  568.       the header. 
  569.  
  570.  
  571.   10. Add these lines to, or modify existing lines in, the header (the 
  572.       first group of lines in any PostScript file): 
  573.  
  574.     
  575.             %!Adobe-2.0 EPSF
  576.             %%Creator: name
  577.             %%CreationDate: date
  578.             %%Title: filename
  579.             %%BoundingBox: a b c d
  580.     
  581.  
  582.       Note: Make sure that the first line in the file is ``% 
  583.       !Adobe-2.0 EPSF.'' Also, do not separate the header lines with a 
  584.       blank line space. The first blank line that PostScript encounters 
  585.       tells it that the the next line begins the body of the program. 
  586.  
  587.       For ``name,'' type your name or initials. For ``date,'' type 
  588.       today's date using any format (for example, MM-DD-YY, MM/DD/YY, 
  589.       July 5, 1987, and so on). For ``filename,'' type the name of the 
  590.       PostScript file. After ``BoundingBox: ,'' type the measurements 
  591.       you took in steps 3, 4, 5, and 6, separating each with a space: 
  592.       ``a'' is the measurement from Step 3, ``b'' is the measurement 
  593.       from Step 4, ``c'' is the measurement from Step 5, and ``d'' is 
  594.       the measurement from Step 6. 
  595.  
  596.  
  597.   11. Save the file in text-only format. 
  598.  
  599.     If you are interested in learning how to further edit your 
  600.     PostScript files, these books are available at most bookstores: 
  601.  
  602.     Understanding PostScript Programming and the green book. 
  603.  
  604.     Encapsulated PostScript is discussed in Appendix C of the old red 
  605.     book. The new red book has a lot of information about Encapsulated 
  606.     PostScript. 
  607.  
  608.     There will be a technical note available from Adobe called 
  609.     ``Guidelines for Specific Operators'' that will talk about why some 
  610.     operators are prohibited and how to use the others. 
  611.  
  612.  
  613. Subject: 9.4 How do I get the bounding box of a PostScript picture? 
  614.  
  615.     Use bbfig or epsinfo.ps. 
  616.  
  617.     Or if you would rather construct the bounding box by hand, use 
  618.     Ghostview, which has a continuous readout of the mouse cursor in 
  619.     the default user coordinate system. You simply place the mouse in 
  620.     the corners of the figure and read off the coordinates. 
  621.  
  622. Subject: 10 About The Comp.Lang.PostScript FAQ (and Usenet Guide to 
  623.     PostScript) 
  624.  
  625.  
  626. Subject: 10.1 The PostScript FAQ: What is it? 
  627.  
  628.     The PostScript FAQ is a set of answers to frequently asked 
  629.     questions (FAQs) that have appeared on the Usenet newsgroup 
  630.     comp.lang.postscript. It is broken into many useful sections. 
  631.  
  632.     The Usenet Guide to PostScript is a larger set of help and answers 
  633.     to PostScript questions, plus a tutorial for new users. It is still 
  634.     in the process of being created. There is one file ``Exactly What 
  635.     Does a Transformation Matrix Do?'', that is definitely not part of 
  636.     the FAQ. Please send more! 
  637.  
  638.     I need help writing and revising answers for common questions 
  639.     relating to PostScript. Almost all of the information in the 
  640.     documents has been written by kind volunteers. The answers will be 
  641.     published in either or both documents. A very long answer in the 
  642.     Usenet Guide may be summarized, referred to briefly, or not 
  643.     mentioned at all in the FAQ. 
  644.  
  645.  
  646. Subject: 10.2 How to get the FAQ files 
  647.  
  648.     The FAQ is available by anonymous ftp to 
  649.     wilma.cs.brown.edu:pub/comp.lang.postscript/ You can get it 
  650.     formatted in plain text ASCII, LaTeX, or PostScript. 
  651.  
  652.     I would be happy to email a copy of the FAQ in any format to you if 
  653.     you do not have FTP. 
  654.  
  655.  
  656. Subject: 10.3 How to write a FAQ answer 
  657.  
  658.     I greatly appreciate your time and effort to help improve the 
  659.     quality of the FAQ. Thank you for being willing to contribute! 
  660.  
  661.  
  662.     * Please check to see if the topic is already in an FAQ. Perhaps 
  663.       you really mean to submit a revision to an existing section. 
  664.  
  665.     * Start with a clear statement about what problem you are solving. 
  666.  
  667.     * Write for novice users, in ``tutorial format'', even if the 
  668.       answer is meant for experienced programmers. 
  669.  
  670.     * Be specific when you make references. 
  671.  
  672.     * Be complete, and take the time to look over your draft and 
  673.       revise. 
  674.  
  675.     * Answers should not be too wordy, unless you intend to write a 
  676.       long answer for the Usenet Guide and have a shorter summary or a 
  677.       pointer to the description placed in the FAQ. If you want to 
  678.       write the summary yourself, thanks! 
  679.  
  680.     * Obviously, I cannot accept copyrighted material without 
  681.       permission. Don't write the FAQ by paraphrasing from a 
  682.       copyrighted book! 
  683.  
  684.  
  685. Subject: 10.4 The FAQ can contain LaTeX and PostScript inserts 
  686.  
  687.     The FAQ is actually written with LaTeX, so feel free to submit with 
  688.     that text formatting language. There is a PostScript version of the 
  689.     FAQ also, so feel free to send along PostScript pictures to 
  690.     include. 
  691.  
  692.  
  693. Subject: 10.5 Revising the FAQ 
  694.  
  695.     Suggestions and comments are welcomed. My favorite way of receiving 
  696.     a change suggestion is if you make a copy of the FAQ, edit the 
  697.     copy, and mail me the modification, or a context diff (include the 
  698.     version number). 
  699.  
  700.  
  701. Subject: 10.6 How to submit new information 
  702.  
  703.     If you know something that you think is worthwhile to be put in a 
  704.     FAQ, definitely send it to me! 
  705.  
  706.     Don't hold back if your information is very specific. If there's 
  707.     too much information to post I will archive it at an ftp site and 
  708.     place a pointer to it in the FAQ. 
  709.  
  710.  
  711. Subject: 10.7 How to add a program description to the FAQ index 
  712.  
  713.     If the program is original, please send it to me, or tell me where 
  714.     I can get it. Please put your name and email address at the top of 
  715.     each file. Your program will be doubly useful if you clean up the 
  716.     program so that other people can use it as an example to learn. 
  717.  
  718.     If the program was written by someone else, please send me just the 
  719.     title, description, and where to get it. I may already have it. 
  720.  
  721.     For programs the FAQ needs to know: 
  722.  
  723.  
  724.     * What is the name of the program? 
  725.  
  726.     * What does it claim to do, and does it do it well? Is it worth 
  727.       using? 
  728.  
  729.     * Where is it available? What ftp sites can I get it from? 
  730.  
  731.     * How much does it cost? Is it free? 
  732.  
  733.     * What kinds of computers does it run on? 
  734.  
  735.     * Who is the author and does the author give an email address? 
  736.  
  737.     * Does it handle PostScript 2? 
  738.  
  739.     * What packages does it rely on? 
  740.  
  741.     If the program is a PostScript interpreter, then the FAQ also needs 
  742.     to know: 
  743.  
  744.  
  745.     * Does it let you go backwards one page? 
  746.  
  747.     * Does it display the number of pages in the document? 
  748.  
  749.     * Does it let you print PostScript to a non-PostScript printer? 
  750.  
  751.     * What formats can it convert to? 
  752.  
  753.  
  754. Subject: 10.8 How to add a book description to the FAQ 
  755.  
  756.     For books the FAQ needs to know: 
  757.  
  758.  
  759.     * What is the name of the book or document? 
  760.  
  761.     * What does it claim to do, and does it do it well? Is it worth 
  762.       using? 
  763.  
  764.     * Can I get it on-line? 
  765.  
  766.     * Who wrote it? Does the author give an email address? 
  767.  
  768.     * Who is the publisher, and what is the copyright date? 
  769.  
  770.     * Does the publisher list an address and phone number or fax 
  771.       number? 
  772.  
  773.     * What is the ISBN number of the book? 
  774.  
  775.     * What is the library call number of the book? 
  776.  
  777.     * How much does the book cost? 
  778.  
  779.     * Does it cover PostScript 2? 
  780.  
  781.     * Are coding examples from the book available by email or anonymous 
  782.       ftp? 
  783.  
  784.     * Do the authors sell the coding examples on a diskette? 
  785.  
  786.  
  787. Subject: 10.9 Questions that need answers 
  788.  
  789.  
  790.  
  791.    1. Where are ftp sites that have PostScript freeware? 
  792.  
  793.  
  794.    2. What vendors sell fonts for PostScript printers? Where are the 
  795.       free ftp sites for them? 
  796.  
  797.  
  798.    3. What are TrueType fonts? 
  799.  
  800.  
  801.    4. Are there any free encapsulated PostScript converters? 
  802.  
  803.  
  804.    5. What is the charter for comp.lang.postscript? 
  805.  
  806.  
  807.    6. What questions should the FAQ have? 
  808.  
  809.  
  810.    7. What book information is wrong or missing in the FAQ? 
  811.  
  812.  
  813.    8. What program information is wrong or missing in the FAQ? 
  814.  
  815.  
  816.    9. What ftp site have good examples of PostScript code? 
  817.