PostscriptPrinterStream.st
author tm
Tue, 24 Sep 2002 15:56:00 +0200
changeset 1091 153d101d7015
parent 1075 7272338c6b53
child 1108 e5be3dd73130
permissions -rw-r--r--
fixed: flushLine -> access on unspecified lineStream
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     1
"
4
1f66800df351 *** empty log message ***
claus
parents: 2
diff changeset
     2
 COPYRIGHT (c) 1988 by Claus Gittinger
71
claus
parents: 36
diff changeset
     3
	      All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     4
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    11
"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    12
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
    13
"{ Package: 'stx:libbasic2' }"
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
    14
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    15
PrinterStream subclass:#PostscriptPrinterStream
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
    16
	instanceVariableNames:'xPos yPos lineStream colNr lineNr fFamily fStyle pageStartAction
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
    17
		pageEndAction pageCount sendXPosition'
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    18
	classVariableNames:'Prolog Trailer PageProlog PageTrailer FontNames FontHeight
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
    19
		FontWidth LeftX TopY PageHeight LinesPerPage PhysicalPageHeight
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
    20
		Italic Bold Normal BoldItalic Courier Times Helvetica TopMargin
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
    21
		LeftMargin BottomMargin RightMargin SupportsColor Resolution'
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    22
	poolDictionaries:''
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    23
	category:'Streams-External'
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    24
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    25
467
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
    26
!PostscriptPrinterStream class methodsFor:'documentation'!
6
claus
parents: 4
diff changeset
    27
31
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    28
copyright
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    29
"
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    30
 COPYRIGHT (c) 1988 by Claus Gittinger
71
claus
parents: 36
diff changeset
    31
	      All Rights Reserved
31
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    32
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    33
 This software is furnished under a license and may be used
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    34
 only in accordance with the terms of that license and with the
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    36
 be provided or otherwise made available to, or used by, any
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    37
 other person.  No title to or ownership of the software is
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    38
 hereby transferred.
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    39
"
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    40
!
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    41
6
claus
parents: 4
diff changeset
    42
documentation
claus
parents: 4
diff changeset
    43
"
28
350f8e9493a4 *** empty log message ***
claus
parents: 10
diff changeset
    44
    This class provides simple text output to postscript printers;
31
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    45
    to use it, evaluate 
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
    46
	Smalltalk at:#Printer put:PostscriptPrinterStream
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
    47
    (usually in some rc file).
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
    48
    or change it via the launchers settings-menu.
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
    49
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    50
    See examples on how to send something to the printer.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    51
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    52
    For now, only Helvetica, Courier and Times fonts in italic, roman and bold
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    53
    are supported.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    54
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    55
    It does not directly support graphics and other fancy features of Postscript,
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    56
    but provides a compatible interface for simple text line-printing 
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    57
    (see other subclasses of PrinterStream).
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    58
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    59
    If you already have a postscript string at hand, this can be sent to
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    60
    the printer in native mode.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    61
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    62
    To output graphics, you need the PSGraphicsContext (and friend-) classes.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    63
    These provide protocol similar to the one provided by display graphicContexts.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    64
    Notice, that these postscript classes are derived from public domain code;
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    65
    there is no warranty.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    66
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    67
    [see also:]
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
    68
	PSGraphicsContext 
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
    69
	EpsonFX1PrinterStream HPLjetIIPrinterStream PrinterStream
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
    70
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
    71
    [author:]
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
    72
	Claus Gittinger
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    73
"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    74
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    75
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    76
examples
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    77
"
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
    78
    For text printing, use:
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    79
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    80
        |s|
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
    81
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    82
        s := Printer new.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    83
        s nextPutAll:'hello'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    84
        s nextPutAll:'normal '.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    85
        s bold; nextPutAll:'this is bold'; normal; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    86
        s nextPutAll:'normal '.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    87
        s italic; nextPutAll:'this is italic'; normal; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    88
        s nextPutAll:'normal '.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    89
        s boldItalic; nextPutAll:'this is boldItalic'; normal; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    90
        s nextPutAll:'normal '.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    91
        s underline; nextPutAll:'this is underlined'; noUnderline; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    92
        s nextPutAll:'normal again '.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    93
        s strikeout; nextPutAll:'this is strikedout'; noStrikeout; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    94
        s helvetica.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    95
        s nextPutAll:'helvetica '.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    96
        s underline; nextPutAll:' helv-underline'; noUnderline;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    97
          space; strikeout; nextPutAll:'helv-strikeout'; noStrikeout;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    98
          bold; nextPutAll:' helv-bold'; normal; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
    99
        s times.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   100
        s nextPutAll:'times'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   101
        s courier.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   102
        s nextPutAll:'courier'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   103
        s close
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   104
                                                                        [exEnd]
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   105
    or, if you already have emphasized text at hand:
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   106
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   107
        |s|
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   108
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   109
        s := Printer new.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   110
        s nextPutAll:'hello'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   111
        s nextPutAll:'this is '; 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   112
          nextPutAll:(Text string:'bold' emphasis:#bold); 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   113
          cr;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   114
          nextPutAll:'this is '; 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   115
          nextPutAll:(Text string:'italic' emphasis:#italic); 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   116
          cr;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   117
          nextPutAll:'this is ';
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   118
          nextPutAll:(Text string:'boldItalic' emphasis:#(bold italic)); 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   119
          cr;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   120
          nextPutAll:'normal again'; 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   121
          cr;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   122
          helvetica;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   123
          nextPutAll:'helvetica';
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   124
          cr;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   125
          times;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   126
          nextPutAll:'times'; 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   127
          cr;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   128
          courier;
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   129
          nextPutAll:'courier';
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   130
          cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   131
        s close
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   132
                                                                        [exEnd]
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
   133
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   134
    placing a page-hook, to add a page number:
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   135
    (page hooks require that you understand some postscript ...
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   136
     ... and have a look at how this class generates its postscript code)
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   137
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   138
        |s hook pageNr|
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   139
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   140
        s := Printer new.
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   141
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   142
        pageNr := 0.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   143
        hook := [ 
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   144
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   145
                    pageNr := pageNr + 1.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   146
                    s placeString:('page ' , pageNr printString) at:(5500 @ 400).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   147
                ].
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   148
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   149
        s pageEndAction:hook.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   150
        (1 to:200) do:[:lineNr |
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   151
            s nextPutAll:'line ' , lineNr printString.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   152
            s cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   153
        ].
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   154
        s close.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   155
                                                                        [exEnd]
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   156
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   157
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   158
    placing a page-hook, to add a custom frame, logo or company letter-head:
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   159
    (page hooks require that you understand some postscript ...
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   160
     ... and have a look at how this class generates its postscript code.
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   161
     ... and notice that the code below is a q&d demo, working with letter-sized
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   162
     pages only; a real program should ask the printerStream about the actual 
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   163
     pageHeight/pageWidth.)
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   164
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   165
        |s hook pageNr|
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   166
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   167
        s := Printer new.
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   168
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   169
        pageNr := 0.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   170
        hook := [ 
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   171
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   172
                    pageNr := pageNr + 1.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   173
                    s placeString:('page ' , pageNr printString) at:(5500 @ 400).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   174
                    s placeString:('Document revision:') at:(900 @ 1200).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   175
                    s placeString:('Revieved by:')       at:(900 @ 900).
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   176
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   177
                    s setNative:true.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   178
                    s nextPutAll:'0 setlinewidth'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   179
                    s nextPutAll:'800 800 moveto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   180
                    s nextPutAll:'11000 800 lineto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   181
                    s nextPutAll:'11000 15500 lineto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   182
                    s nextPutAll:'800 15500 lineto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   183
                    s nextPutAll:'800 800 lineto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   184
                    s nextPutAll:'stroke'; cr.
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   185
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   186
                    s nextPutAll:'800 1100 moveto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   187
                    s nextPutAll:'11000 1100 lineto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   188
                    s nextPutAll:'stroke'; cr.
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   189
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   190
                    s nextPutAll:'800 1400 moveto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   191
                    s nextPutAll:'11000 1400 lineto'; cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   192
                    s nextPutAll:'stroke'; cr.
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   193
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   194
                    s setNative:false.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   195
                ].
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   196
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   197
        s pageEndAction:hook.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   198
        (1 to:200) do:[:lineNr |
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   199
            s nextPutAll:'line ' , lineNr printString.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   200
            s cr.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   201
        ].
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   202
        s close.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   203
                                                                        [exEnd]
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   204
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   205
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   206
    If you already have a postscript string at hand, this can be sent to
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   207
    the printer in native mode:
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   208
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   209
        |s|
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   210
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   211
        s := Printer newNative.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   212
        s nextPutAll:<your postscript string>.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   213
                                                                        [exEnd]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   214
        s close
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   215
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
   216
    To output graphics, you need the PSGraphicsContext (and friend-) classes.
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
   217
    These provide protocol similar to the one provided by display graphicContexts.
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   218
    Notice, that these postscript classes are derived from public domain code;
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   219
    there is no warranty.
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   220
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   221
    Usage:
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   222
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   223
        |drawable s|
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   224
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   225
        s := Printer newNative.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   226
        drawable := PSGraphicsContext on:s.
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   227
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   228
        drawable displayLineFrom:(0@0) to:(100@100).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   229
        drawable displayLineFrom:(100@0) to:(0@100).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   230
        drawable displayCircle:(150@150) radius:50.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   231
        (Image fromFile:'bitmaps/SBrowser.xbm') displayOn:drawable at:(50@30).
223
a204fe6b665c commentary & image fixes
Claus Gittinger <cg@exept.de>
parents: 222
diff changeset
   232
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   233
        drawable close.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   234
                                                                        [exEnd]
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   235
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   236
      the same in a view:
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   237
                                                                        [exBegin]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   238
        |drawable|
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   239
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   240
        drawable := (View extent:200@200) openAndWait.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   241
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   242
        drawable displayLineFrom:(0@0) to:(100@100).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   243
        drawable displayLineFrom:(100@0) to:(0@100).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   244
        drawable displayCircle:(150@150) radius:50.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   245
        (Image fromFile:'bitmaps/SBrowser.xbm') displayOn:drawable at:(50@30).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   246
                                                                        [exEnd]
6
claus
parents: 4
diff changeset
   247
"
claus
parents: 4
diff changeset
   248
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   249
467
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   250
!PostscriptPrinterStream class methodsFor:'initialization'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   251
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   252
initCharacterSize
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   253
    "setup the character parameters"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   254
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   255
    FontHeight := 200.   "/ used to scale fonts - corresponds to a 10 point font size
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   256
    FontWidth := 120.    "/ used to compute width of tabs
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   257
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   258
    "Created: 23.4.1996 / 19:53:34 / cg"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   259
    "Modified: 23.4.1996 / 20:05:17 / cg"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   260
    "Modified: 30.5.1996 / 17:24:05 / ca"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   261
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   262
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   263
initFonts
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   264
    "setup the font names.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   265
     initProlog uses those parameters."
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   266
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   267
    Italic := 0.     "/ offset from base-font# to italic version
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   268
    Bold := 1.       "/ offset from base-font# to bold version
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   269
    BoldItalic := 2. "/ offset from base-font# to boldItalic version
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   270
    Normal := 3.     "/ offset from base-font# to normal version
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   271
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   272
    Helvetica := 0.  "/ # of helvetica base font
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   273
    Times := 4.      "/ # of times base font
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   274
    Courier := 8.    "/ # of courier base font
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   275
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   276
    FontNames := #( 
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   277
                    'Helvetica-Oblique'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   278
                    'Helvetica-Bold'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   279
                    'Helvetica-BoldOblique'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   280
                    'Helvetica'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   281
                    'Times-Italic'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   282
                    'Times-Bold'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   283
                    'Times-BoldItalic'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   284
                    'Times'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   285
                    'Courier-Oblique'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   286
                    'Courier-Bold'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   287
                    'Courier-BoldOblique'
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   288
                    'Courier' 
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   289
                  )
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   290
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   291
    "
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   292
     PostscriptPrinterStream initFonts
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   293
    "
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   294
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   295
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   296
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   297
initPage
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   298
    "setup the page parameters.
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   299
     All coordinates are scaled by 20 w.r.t the PS coordinates (i.e. in twips)."
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   300
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   301
    PageFormat isNil ifTrue:[
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   302
        PageFormat := #letter
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   303
    ].
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   304
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   305
    TopMargin isNil ifTrue:[
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   306
        TopMargin := 0.6.      "/ inches
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   307
    ].
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   308
    BottomMargin isNil ifTrue:[
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   309
        BottomMargin := 1.2    "/ inches
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   310
    ].
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   311
    LeftMargin isNil ifTrue:[
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   312
        LeftMargin := 0.6.     "/ inches
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   313
    ].
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   314
    RightMargin isNil ifTrue:[
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   315
        RightMargin := 0.6.    "/ inches
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   316
    ].
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   317
    Resolution isNil ifTrue:[
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   318
        Resolution := 300@300. "/ DPI
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   319
    ].
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   320
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   321
    "/     +-----------------------------------------------+  PageHeight
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   322
    "/     |                   TOPMARGIN             |     |
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   323
    "/     | LeftX +---------------------------------------|  TopY
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   324
    "/     |       |1st printed line                 |     |
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   325
    "/     |       |                                 |     |
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   326
    "/     | LEFT  |                                 |RIGHT| (only used by
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   327
    "/     | MARGIN|                                 |MARG.|  PSGraphicsContext)
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   328
    "/     |       |                                 |     |
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   329
    "/     |       |last line (linesPerPage)         |     |
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   330
    "/     |       +---------------------------------------|
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   331
    "/     |                   BOTTOMMARGIN          |     |
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   332
    "/     (0/0)-------------------------------------------+  0
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   333
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   334
    LeftX := (UnitConverter convert:LeftMargin from:#inch to:#twip) rounded.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   335
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   336
    PhysicalPageHeight := (UnitConverter convert:1 from:(PageFormat , 'H') to:#twip) rounded.
447
8986b0c4f589 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 440
diff changeset
   337
    Landscape == true ifTrue:[
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   338
        PageHeight := (UnitConverter convert:1 from:(PageFormat , 'lH') to:#twip) rounded.
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   339
    ] ifFalse:[
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   340
        PageHeight := (UnitConverter convert:1 from:(PageFormat , 'H') to:#twip) rounded.
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   341
    ].
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   342
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   343
    TopY := PageHeight - (UnitConverter convert:TopMargin from:#inch to:#twip) rounded.
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   344
    LinesPerPage := TopY - (UnitConverter convert:BottomMargin from:#inch to:#twip) rounded // 200.
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   345
386
cebdfb2e9cf0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   346
    "
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   347
     TopMargin := LeftMargin := BottomMargin := nil.
386
cebdfb2e9cf0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   348
     self initPage
cebdfb2e9cf0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   349
    "
cebdfb2e9cf0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 382
diff changeset
   350
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   351
    "Modified: 30.5.1996 / 17:24:55 / ca"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   352
    "Modified: 5.9.1996 / 21:43:00 / cg"
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   353
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   354
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   355
initPageProlog
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   356
    "define the page prolog"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   357
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   358
    PageProlog :=
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   359
'StartPage
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   360
'.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   361
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   362
    "Created: 23.4.1996 / 19:56:16 / cg"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   363
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   364
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   365
initPageTrailer
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   366
    "define the page epilog"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   367
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   368
    PageTrailer :=
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   369
'EndPage
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   370
'.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   371
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   372
    "Modified: 23.4.1996 / 19:55:50 / cg"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   373
    "Created: 23.4.1996 / 19:56:30 / cg"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   374
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   375
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   376
initProlog
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   377
    "define the documents prolog"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   378
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   379
    |tmpString t fontNr|
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   380
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   381
    tmpString :=
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   382
'%!!PS-Adobe-2.0
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   383
%%Creator: Smalltalk/X
438
c38453be27ae put cleanup stuff after %%Trailer
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   384
%%CreationDate: ' , AbsoluteTime now printString , '
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   385
%%DocumentFonts: '.
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   386
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   387
    FontNames do:[:aName |
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   388
        tmpString := tmpString , aName , ' '
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   389
    ].
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   390
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   391
    tmpString := tmpString , '
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   392
%%Pages: (atend)
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   393
%%EndComments
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   394
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   395
save /SmalltalkJob exch def
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   396
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   397
/OriginalState gstate def
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   398
/StartSmalltalkDoc{$smalltalk begin}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   399
/$smalltalk 50 dict def $smalltalk begin
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   400
/EndSmalltalkDoc{end}def
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   401
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   402
/S/show load def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   403
/X{exch 0 rmoveto S}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   404
/Y{exch 0 exch rmoveto S}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   405
/B{3 1 roll moveto S}def
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   406
/SUL {gsave currentpoint currentfont /FontInfo get /UnderlinePosition get
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   407
 0 exch currentfont /FontMatrix get dtransform exch pop add newpath moveto
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   408
 dup stringwidth rlineto stroke grestore S} def
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   409
/SSO {gsave currentpoint 300
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   410
 0 exch currentfont /FontMatrix get dtransform exch pop add 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   411
 newpath moveto dup stringwidth rlineto stroke grestore S} def
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   412
/BUL{3 1 roll moveto SUL}def
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   413
/BSO{3 1 roll moveto SSO}def
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   414
/F{$fd exch get setfont}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   415
/StartPage{/svpg save def .05 dup scale}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   416
/EndPage{svpg restore showpage}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   417
/DoPreFeed{/statusdict where{pop
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   418
 statusdict/prefeed known{statusdict exch/prefeed exch put 0}if}if pop}def
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   419
/Landscape{90 rotate 0 -' , PageHeight printString "15840", ' translate}def
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   420
/ISOrecode {findfont dup length dict begin
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   421
 {1 index /FID ne {def} {pop pop} ifelse} forall
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   422
 /Encoding ISOLatin1Encoding def
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   423
 currentdict end definefont pop} def
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   424
/SetUpFonts
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   425
 {dup/$fd exch array def{findfont exch scalefont $fd 3 1 roll put}repeat}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   426
/InitGaudy{/TwoColumn exch def /BarLength exch def
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   427
/ftD /ISO-Times-Bold findfont 12 UP scalefont def
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   428
/ftF /ISO-Times-Roman findfont 14 UP scalefont def
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   429
/ftP /ISO-Helvetica-Bold findfont 30 UP scalefont def}def
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   430
/U{1440 mul}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   431
/UP{U 72 div}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   432
/LB{/pts exch UP def /charcolor exch def /boxcolor exch def /font exch def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   433
 /label exch def /dy exch def /dx exch def /lly exch def /llx exch def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   434
 gsave boxcolor setgray
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   435
 llx lly moveto dx 0 rlineto 0 dy rlineto dx neg 0 rlineto closepath fill
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   436
 /lines label length def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   437
 /yp lly dy add dy lines pts mul sub 2 div sub pts .85 mul sub def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   438
 font setfont charcolor setgray
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   439
 label {dup stringwidth pop 2 div llx dx 2 div add exch sub yp moveto show
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   440
   /yp yp pts sub def}forall grestore}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   441
/Gaudy{/Page exch def /Date exch def /File exch def /Comment exch def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   442
 .25 U 10.2 U BarLength .1 sub U .25 U [File] ftF .97 0 14 LB
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   443
 .25 U 10.45 U BarLength .1 sub U .25 U [Comment] ftF 1 0 14 LB
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   444
 .25 U 10.2 U 1 U .5 U Date ftD .7 0 12 LB
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   445
 BarLength .75 sub U 10.2 U 1 U .5 U [Page] ftP .7 1 30 LB
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   446
 TwoColumn{BarLength 2 div .19 add U 10.2 U moveto 0 -10 U rlineto stroke}if
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   447
}def
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   448
end
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   449
StartSmalltalkDoc 
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   450
% end of fixed prolog
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   451
'.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   452
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   453
    t := ''.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   454
    FontNames do:[:aName |
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   455
        t := t , '/ISO-' , aName , ' /' , aName , ' ISOrecode
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   456
'.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   457
    ].
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   458
    t := t , '
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   459
'.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   460
    tmpString := tmpString , t.
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   461
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   462
    t := ''.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   463
    fontNr := 0.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   464
    FontNames do:[:aName |
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   465
        t := t , (fontNr printString) , ' ' 
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   466
               , (FontHeight printString) , ' '
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   467
               , '/ISO-' , aName , (Character nl) asString.
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   468
        fontNr := fontNr + 1
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   469
    ].
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   470
    tmpString := tmpString , t.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   471
    tmpString := tmpString , fontNr printString , ' SetUpFonts
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   472
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   473
% end of prolog
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   474
%%EndProlog
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   475
'.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   476
    Prolog := tmpString.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   477
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   478
    "
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   479
     PostscriptPrinterStream initProlog
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   480
    "
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   481
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   482
    "Created: 23.4.1996 / 19:40:44 / cg"
438
c38453be27ae put cleanup stuff after %%Trailer
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   483
    "Modified: 7.9.1996 / 16:01:52 / cg"
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   484
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   485
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   486
initTrailer
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   487
    "define the documents epilog"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   488
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   489
        Trailer :=
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   490
'
438
c38453be27ae put cleanup stuff after %%Trailer
Claus Gittinger <cg@exept.de>
parents: 437
diff changeset
   491
%%Trailer
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   492
EndSmalltalkDoc
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   493
SmalltalkJob restore
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   494
'
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   495
440
da568c775e8b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
   496
    "Modified: 7.9.1996 / 16:27:49 / cg"
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   497
!
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   498
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   499
initialize
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   500
    Normal isNil ifTrue:[
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   501
        self initFonts.
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   502
        self initPage.
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   503
        self initCharacterSize.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   504
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   505
        "/ self initProlog.   - now done lazy
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   506
        "/ self initTrailer.  - now done lazy
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   507
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   508
        self initPageProlog.
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   509
        self initPageTrailer
170
7194ef17f5b8 only init once
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   510
    ]
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   511
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   512
    "
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   513
     Normal := nil.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   514
     self initialize
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   515
    "
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   516
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   517
    "Modified: 18.5.1996 / 09:46:15 / cg"
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   518
!
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   519
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   520
reInitPage
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   521
    self initPage.
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   522
    Prolog := nil.
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   523
    "/ self initProlog.   - now done lazy
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   524
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   525
    "Created: 31.5.1996 / 23:35:18 / cg"
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   526
! !
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   527
467
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   528
!PostscriptPrinterStream class methodsFor:'accessing - defaults'!
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   529
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   530
bottomMargin
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   531
    "return the bottom margin (in inches)"
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   532
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   533
    ^ BottomMargin
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   534
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   535
    "Modified: 3.6.1996 / 10:44:44 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   536
    "Created: 5.9.1996 / 21:42:08 / cg"
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   537
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   538
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   539
bottomMargin:inches
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   540
    "set the bottom margin (in inches)"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   541
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   542
    BottomMargin := inches.
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   543
    self reInitPage.
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   544
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   545
    "Modified: 3.6.1996 / 10:47:16 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   546
    "Created: 5.9.1996 / 21:42:13 / cg"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   547
!
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   548
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   549
leftMargin
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   550
    "return the left margin (in inches)"
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   551
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   552
    ^ LeftMargin
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   553
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   554
    "Modified: 3.6.1996 / 10:45:11 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   555
    "Created: 5.9.1996 / 21:42:16 / cg"
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   556
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   557
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   558
leftMargin:inches
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   559
    "set the left margin (in inches)"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   560
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   561
    LeftMargin := inches.
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   562
    self reInitPage.
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   563
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   564
    "Created: 3.6.1996 / 10:46:33 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   565
    "Modified: 5.9.1996 / 21:42:19 / cg"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   566
!
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   567
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   568
psProlog
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   569
    Prolog isNil ifTrue:[
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   570
        self initProlog
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   571
    ].
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   572
    ^ Prolog
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   573
!
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   574
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   575
psTrailer
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   576
    Trailer isNil ifTrue:[
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   577
        self initTrailer
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   578
    ].
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   579
    ^ Trailer
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   580
!
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   581
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   582
resolution
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   583
    "return the printers actual resolution (if known)"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   584
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   585
    ^ Resolution
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   586
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   587
    "Modified: 3.6.1996 / 10:45:17 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   588
    "Created: 5.9.1996 / 21:41:49 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   589
!
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   590
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   591
resolution:dpiValuePoint
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   592
    "set the printers actual resolution (if known)"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   593
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   594
    Resolution := dpiValuePoint
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   595
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   596
    "Modified: 3.6.1996 / 10:45:17 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   597
    "Created: 5.9.1996 / 21:41:49 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   598
!
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   599
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   600
rightMargin
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   601
    "return the right margin (in inches)"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   602
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   603
    ^ RightMargin
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   604
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   605
    "Modified: 3.6.1996 / 10:45:11 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   606
    "Created: 5.9.1996 / 21:42:16 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   607
!
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   608
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   609
rightMargin:inches
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   610
    "set the right margin (in inches)"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   611
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   612
    RightMargin := inches.
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   613
    self reInitPage.
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   614
!
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   615
431
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   616
supportsColor
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   617
    SupportsColor notNil ifTrue:[^ SupportsColor].
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   618
    ^ false
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   619
!
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   620
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   621
supportsColor:aBoolean
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   622
    SupportsColor := aBoolean.
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   623
!
4d66e2730d76 supports color
ca
parents: 391
diff changeset
   624
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   625
topMargin
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   626
    "return the top margin (in inches)"
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   627
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   628
    ^ TopMargin
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   629
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   630
    "Modified: 3.6.1996 / 10:45:17 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   631
    "Created: 5.9.1996 / 21:41:49 / cg"
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   632
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   633
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   634
topMargin:inches
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   635
    "set the top margin (in inches)"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   636
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   637
    TopMargin := inches.
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   638
    self reInitPage.
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   639
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   640
    "Modified: 3.6.1996 / 10:47:26 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
   641
    "Created: 5.9.1996 / 21:41:55 / cg"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   642
! !
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   643
467
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   644
!PostscriptPrinterStream class methodsFor:'queries'!
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   645
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   646
printerTypeName
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   647
    "return a descriptive name"
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   648
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   649
    ^ 'postscript printer'
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   650
!
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   651
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   652
supportsMargins
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   653
    "return true if this printer supports margins"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   654
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   655
    ^ true
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   656
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   657
    "Created: 3.6.1996 / 10:48:04 / cg"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   658
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 375
diff changeset
   659
368
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   660
supportsPageSizes
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   661
    "return true if this printer supports different page sizes"
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   662
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   663
    ^ true
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   664
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   665
    "Created: 31.5.1996 / 22:35:39 / cg"
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   666
!
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   667
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   668
supportsPostscript
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   669
    "return true if this is a postscript printer"
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   670
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   671
    ^ true
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   672
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   673
    "Created: 10.2.1996 / 16:23:23 / cg"
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   674
! !
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   675
879
e69bf56dc758 category change
Claus Gittinger <cg@exept.de>
parents: 866
diff changeset
   676
!PostscriptPrinterStream methodsFor:'access-writing'!
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   677
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   678
cr
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   679
    "send line termination"
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   680
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   681
    self flushLine.
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   682
    native == true ifTrue:[^ super cr].
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   683
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   684
    xPos := LeftX.
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   685
    colNr := 0.
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   686
    sendXPosition := true.
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   687
    yPos := yPos - FontHeight.
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   688
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   689
    lineNr := lineNr + 1.
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   690
    lineNr > LinesPerPage ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   691
        self nextPage
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   692
    ]
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   693
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   694
    "Modified: 1.6.1996 / 13:09:30 / cg"
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   695
!
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   696
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   697
nextPut:aCharacter
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   698
    |code|
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   699
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   700
    (aCharacter == Character cr) ifTrue:[
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   701
        ^ self cr
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   702
    ].
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   703
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   704
    native == true ifTrue:[
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   705
        ^ super nextPut:aCharacter
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   706
    ].
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   707
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   708
    (aCharacter == $( ) ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   709
        lineStream nextPutAll:'\(' .
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   710
        ^ self
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   711
    ].
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   712
    (aCharacter == $) ) ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   713
        lineStream nextPutAll:'\)' .
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   714
        ^ self
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   715
    ].
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   716
    (aCharacter == $\ ) ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   717
        lineStream nextPutAll:'\\' .
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   718
        ^ self
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   719
    ].
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   720
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   721
    (aCharacter == Character tab ) ifTrue:[
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   722
        self flushLine.
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   723
        colNr := ((colNr + 8) // 8) * 8. 
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   724
        xPos := LeftX + (colNr * FontWidth).
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   725
        sendXPosition := true.
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   726
        ^ self
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   727
    ].
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   728
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   729
    (code := aCharacter asciiValue) > 16r7F ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   730
        lineStream nextPut:$\ ; nextPutAll:(code printStringRadix:8)
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   731
    ] ifFalse:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   732
        lineStream nextPut:aCharacter
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   733
    ].
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   734
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   735
    "Modified: 23.4.1996 / 20:05:59 / cg"
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   736
! !
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   737
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   738
!PostscriptPrinterStream methodsFor:'accessing'!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   739
467
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   740
colNr
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   741
    "return the current column-Nr (within the line)"
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   742
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   743
    ^ colNr
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   744
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   745
    "Created: 2.1.1997 / 13:29:55 / cg"
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   746
!
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   747
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   748
lineNr
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   749
    "return the current line-Nr (within the page)"
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   750
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   751
    ^ lineNr
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   752
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   753
    "Created: 2.1.1997 / 13:29:38 / cg"
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   754
!
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
   755
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   756
pageCount
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   757
    "returns the number of the currently printed page"
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   758
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   759
    ^ pageCount
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   760
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   761
    "Created: 5.9.1996 / 18:29:23 / cg"
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   762
!
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   763
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   764
pageEndAction:something
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   765
    "set pageEndAction - if non-nil, that will be called before
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   766
     and EndPage is emmitted. 
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   767
     An example use is a private block,
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   768
     which draws a company frame around the page ..."
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   769
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   770
    pageEndAction := something.
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   771
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   772
    "Modified: 30.5.1996 / 16:45:09 / ca"
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   773
!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   774
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   775
pageStartAction:something
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   776
    "set pageStartAction - if nonNil, that is evaluated prior to every page."
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   777
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   778
    pageStartAction := something.
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   779
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   780
    "Modified: 30.5.1996 / 16:44:20 / ca"
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   781
! !
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   782
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   783
!PostscriptPrinterStream methodsFor:'emphasis change'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   784
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   785
bold
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   786
    "further printing is in bold"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   787
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   788
    (fStyle ~~ Bold) ifTrue:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   789
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   790
	fStyle := Bold.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   791
	self setFont.
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   792
    ].
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   793
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   794
    "Modified: 8.6.1996 / 08:17:15 / cg"
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   795
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   796
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   797
boldItalic
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   798
    "further printing is in boldItalic"
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   799
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   800
    (fStyle ~~ BoldItalic) ifTrue:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   801
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   802
	fStyle := BoldItalic.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   803
	self setFont.
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   804
    ].
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   805
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   806
    "Created: 18.5.1996 / 09:36:36 / cg"
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   807
    "Modified: 8.6.1996 / 08:17:21 / cg"
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   808
!
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   809
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   810
italic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   811
    "further printing is in italic"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   812
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   813
    (fStyle ~~ Italic) ifTrue:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   814
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   815
	fStyle := Italic.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   816
	self setFont.
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   817
    ].
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   818
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   819
    "Modified: 8.6.1996 / 08:17:28 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   820
!
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   821
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   822
noStrikeout
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   823
    "further printing is not strikedout"
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   824
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   825
    strikeout ifTrue:[
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   826
	self flushLine.
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   827
	strikeout := false
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   828
    ]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   829
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   830
    "Modified: 8.6.1996 / 08:15:56 / cg"
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   831
    "Created: 8.6.1996 / 08:16:35 / cg"
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   832
!
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   833
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   834
noUnderline
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   835
    "further printing is not underlined"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   836
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   837
    underline ifTrue:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   838
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   839
	underline := false
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   840
    ]
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   841
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   842
    "Created: 8.6.1996 / 08:11:07 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   843
    "Modified: 8.6.1996 / 08:15:56 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   844
!
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   845
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   846
normal
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   847
    "further printing is in normal style (i.e. non-bold/non-italic)"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   848
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   849
    (fStyle ~~ Normal) ifTrue:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   850
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   851
	fStyle := Normal.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   852
	self setFont.
380
fa5adc326473 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   853
    ].
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   854
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   855
    "Modified: 8.6.1996 / 08:17:34 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   856
!
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   857
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   858
strikeout
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   859
    "further printing is strikedout"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   860
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   861
    strikeout ifFalse:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   862
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   863
	strikeout := true
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   864
    ]
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   865
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   866
    "Modified: 8.6.1996 / 08:10:49 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   867
    "Created: 8.6.1996 / 08:16:18 / cg"
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   868
!
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   869
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   870
underline
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   871
    "further printing is underlined"
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   872
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   873
    underline ifFalse:[
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   874
	self flushLine.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   875
	underline := true
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   876
    ]
382
113b013200d3 implement underline
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   877
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   878
    "Modified: 8.6.1996 / 08:16:05 / cg"
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   879
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   880
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   881
!PostscriptPrinterStream methodsFor:'font change'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   882
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   883
courier
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   884
    "further printing is in the courier font"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   885
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   886
    self flushLine.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   887
    fFamily := Courier.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   888
    self setFont
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   889
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   890
    "Modified: 10.4.1996 / 13:34:49 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   891
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   892
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   893
helvetica
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   894
    "further printing is in the helvetica font"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   895
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   896
    self flushLine.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   897
    fFamily := Helvetica.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   898
    self setFont
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   899
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   900
    "Modified: 10.4.1996 / 13:34:58 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   901
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   902
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   903
times
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   904
    "further printing is in the times font"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   905
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   906
    self flushLine.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   907
    fFamily := Times.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   908
    self setFont
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   909
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   910
    "Modified: 10.4.1996 / 13:36:07 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   911
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   912
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   913
!PostscriptPrinterStream methodsFor:'open/close'!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   914
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   915
endPrint
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   916
    "finish a document - finish page; then send documentTrailer.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   917
     Send nothing if nativePrinting."
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   918
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   919
    native == true ifFalse:[
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   920
        self endPage.
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   921
        super nextPutAllUntranslated:(self class psTrailer).
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   922
        super nextPutAllUntranslated:'%%Pages: ' , pageCount printString.
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   923
        super nextPutUntranslated:(Character cr).
440
da568c775e8b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
   924
        super nextPutAllUntranslated:'%%EOF'.
da568c775e8b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
   925
        super nextPutUntranslated:(Character cr).
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   926
    ].
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   927
    super endPrint
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   928
440
da568c775e8b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
   929
    "Modified: 7.9.1996 / 16:28:20 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   930
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   931
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   932
setNative:aBoolean
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   933
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   934
    aBoolean ifTrue:[self flushLine].
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   935
    super setNative:aBoolean.
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   936
!
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   937
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   938
startPrint
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   939
    "start a document - send documentProlog & start a page.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   940
     Send nothing if nativePrinting."
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   941
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   942
    pageCount := 1.
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   943
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   944
    fFamily := Courier.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   945
    fStyle := Normal.
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   946
    underline := false.
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   947
    strikeout := false.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   948
914
7db1f3375ac9 Use startPrint from superclass.
Stefan Vogel <sv@exept.de>
parents: 913
diff changeset
   949
    super startPrint.
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   950
    native == true ifFalse:[
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   951
        super nextPutAllUntranslated:(self class psProlog).
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   952
        self startPage
222
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   953
    ]
15d1c9a82bc6 suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   954
965
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   955
    "Modified: / 26.5.1999 / 16:15:27 / cg"
21f25a87c5c6 prolog initialization now lazy (when needed, not when class is initialized)
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
   956
! !
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   957
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   958
!PostscriptPrinterStream methodsFor:'private'!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   959
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   960
endPage
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   961
    "end a page - flush buffered text & send pageTrailer"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   962
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   963
    self flushLine.
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   964
    pageEndAction notNil ifTrue:[
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   965
	pageEndAction value
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
   966
    ].
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   967
    super nextPutAllUntranslated:PageTrailer
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   968
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   969
    "Modified: 23.4.1996 / 20:00:01 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   970
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   971
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   972
flushLine
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   973
    "flush buffered line text"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   974
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   975
    |lineBuffer|
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   976
1091
153d101d7015 fixed: flushLine -> access on unspecified lineStream
tm
parents: 1075
diff changeset
   977
    lineStream isNil ifTrue:[^ self].
153d101d7015 fixed: flushLine -> access on unspecified lineStream
tm
parents: 1075
diff changeset
   978
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   979
    lineBuffer := lineStream contents.
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   980
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   981
    (lineBuffer size > 0) ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   982
        sendXPosition ifTrue:[
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   983
            self nextPutAllUntranslated:(xPos printString).
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   984
            self nextPutUntranslated:Character space.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   985
            self nextPutAllUntranslated:(yPos printString).
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   986
        ].
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   987
        self nextPutUntranslated:$(.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   988
        self nextPutAllUntranslated:lineBuffer.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   989
        self nextPutUntranslated:$).
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   990
        sendXPosition ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   991
            self nextPutUntranslated:$B.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   992
            sendXPosition := false.
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   993
        ] ifFalse:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   994
            self nextPutUntranslated:$S.
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   995
        ].
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   996
        underline == true ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
   997
            self nextPutAllUntranslated:'UL'.
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   998
        ] ifFalse:[
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
   999
            strikeout == true ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1000
                self nextPutAllUntranslated:'SO'.
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
  1001
            ]
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
  1002
        ].
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
  1003
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1004
        self nextPutUntranslated:(Character cr).
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
  1005
        xPos := xPos + (FontWidth * lineBuffer size).
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
  1006
        colNr := colNr + lineBuffer size
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1007
    ].
866
2b25a5a53929 physical flush after flushLine
ca
parents: 751
diff changeset
  1008
    self flush.
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1009
    lineStream reset.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1010
391
244f0e731912 added strikeout
Claus Gittinger <cg@exept.de>
parents: 390
diff changeset
  1011
    "Modified: 8.6.1996 / 11:40:29 / cg"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1012
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1013
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1014
nextPage
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1015
    "new page - finish previous page & start enew.
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1016
     Should not be sent when nativePrinting."
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1017
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1018
    self endPage.
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1019
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1020
    pageCount := pageCount + 1.
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1021
    self startPage
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1022
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1023
    "Modified: 5.9.1996 / 18:30:00 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
  1024
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
  1025
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1026
placeString:aString at:pos
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1027
    "special entry: place a string at some particular position in my ps-coordinate
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1028
     system. Can be used with endPageActions to place a page-number."
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1029
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1030
    self flushLine;
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1031
         nextPutAllUntranslated:(pos x printString);
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1032
         nextPutUntranslated:Character space;
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1033
         nextPutAllUntranslated:(pos y printString);
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1034
         nextPutUntranslated:$(;
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1035
         nextPutAllUntranslated:aString;
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1036
         nextPutAllUntranslated:')B';
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1037
         nextPutUntranslated:(Character cr).
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1038
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1039
    "Created: 30.5.1996 / 17:06:36 / ca"
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1040
!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1041
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1042
setFont
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1043
    "change the font. 
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1044
     Uses current fFamily and fStyle (which give the fonts nr)"
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1045
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1046
    |fontNumber|
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1047
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1048
    fontNumber := fFamily + fStyle.
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1049
    self nextPutAllUntranslated:fontNumber printString;
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1050
         nextPutAllUntranslated:' F'; 
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1051
         nextPutUntranslated:(Character cr).
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1052
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1053
    "Modified: 23.4.1996 / 20:01:28 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
  1054
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
  1055
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1056
startPage
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1057
    "start a page - send pageProlog, reset x/y position and line/col."
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1058
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1059
    self nextPutAllUntranslated:'%%Page: ' , pageCount printString , ' ' , pageCount printString.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1060
    self nextPutUntranslated:(Character cr).
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1061
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1062
    pageStartAction notNil ifTrue:[
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1063
        pageStartAction value
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1064
    ].
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1065
    self nextPutAllUntranslated:PageProlog.
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  1066
    self class landscape ifTrue:[
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1067
        self nextPutAllUntranslated:'Landscape
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  1068
'.
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  1069
    ].
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1070
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1071
    self setFont.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1072
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1073
    yPos := TopY.
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1074
    xPos := LeftX.
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1075
    lineStream isNil ifTrue:[
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1076
        lineStream := WriteStream on:''.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1077
    ] ifFalse:[
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1078
        lineStream reset.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1079
    ].
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1080
    lineNr := 1.
1075
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1081
    colNr := 0.
7272338c6b53 Speed up everything.
Stefan Vogel <sv@exept.de>
parents: 965
diff changeset
  1082
    sendXPosition := true.
246
ba03a2af594c fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
  1083
432
c8b2fa21b747 count pages (for ghostview to be able to page)
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1084
    "Modified: 5.9.1996 / 18:30:08 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
  1085
! !
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1086
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1087
!PostscriptPrinterStream methodsFor:'queries'!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1088
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1089
fontHeight
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1090
    "the used fonts height in my postscript coordinate system 
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1091
     (i.e. in twips, which is 1/20th of a point)"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1092
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1093
    ^ FontHeight
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1094
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1095
    "Modified: 30.5.1996 / 16:47:37 / ca"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1096
    "Modified: 1.6.1996 / 13:14:51 / cg"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1097
!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1098
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1099
leftX
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1100
    "the left x startPosition (i.e. leftMargin) in my postscript coordinate system.
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1101
     (i.e. in twips, which is 1/20th of a point)"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1102
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1103
    ^ LeftX
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1104
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1105
    "Modified: 30.5.1996 / 16:48:56 / ca"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1106
    "Modified: 1.6.1996 / 13:14:59 / cg"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1107
!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1108
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1109
linesPerPage
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1110
    "the number of lines per page"
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1111
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1112
    ^ LinesPerPage
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1113
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1114
    "Modified: 30.5.1996 / 16:48:20 / ca"
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1115
!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1116
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1117
overAllPageSize
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1118
    "the overAll pageSize in my postscript coordinate system.
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1119
     (i.e. in twips, which is 1/20th of a point)"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1120
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1121
    ^ PageHeight
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1122
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1123
    "Created: 30.5.1996 / 16:56:51 / ca"
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1124
    "Modified: 30.5.1996 / 16:58:01 / ca"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1125
    "Modified: 1.6.1996 / 13:15:06 / cg"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1126
!
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1127
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1128
topY
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1129
    "the top y startPosition (i.e. page-size - topMargin) in my own coordinate system
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1130
     (i.e. in twips, which is 1/20th of a point)"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1131
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1132
    ^ TopY
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1133
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1134
    "Modified: 30.5.1996 / 16:48:48 / ca"
375
ab43222a70ce added access methods for margins
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
  1135
    "Modified: 1.6.1996 / 13:15:23 / cg"
361
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1136
! !
4b3d82315b8a added hooks & query methods (see hook-example)
ca
parents: 349
diff changeset
  1137
467
10cca849db9e added #lineNr & #colNr
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
  1138
!PostscriptPrinterStream class methodsFor:'documentation'!
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
  1139
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
  1140
version
1091
153d101d7015 fixed: flushLine -> access on unspecified lineStream
tm
parents: 1075
diff changeset
  1141
    ^ '$Header: /cvs/stx/stx/libbasic2/PostscriptPrinterStream.st,v 1.57 2002-09-24 13:56:00 tm Exp $'
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
  1142
! !
1091
153d101d7015 fixed: flushLine -> access on unspecified lineStream
tm
parents: 1075
diff changeset
  1143
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1144
PostscriptPrinterStream initialize!