Default entry for pdf file generation.
--- a/PrinterStream.st Fri Oct 25 17:01:55 2002 +0200
+++ b/PrinterStream.st Fri Oct 25 17:03:19 2002 +0200
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1990 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -13,14 +13,14 @@
"{ Package: 'stx:libbasic2' }"
PipeStream subclass:#PrinterStream
- instanceVariableNames:'native pageFormat underline strikeout'
- classVariableNames:'DefaultPageFormat'
- poolDictionaries:''
- category:'Streams-External'
+ instanceVariableNames:'native pageFormat underline strikeout'
+ classVariableNames:'DefaultPageFormat'
+ poolDictionaries:''
+ category:'Streams-External'
!
PrinterStream class instanceVariableNames:'PrintCommand DefaultCommands PageFormat DefaultPageFormats Landscape
- PrintDevice DefaultDevices'
+ PrintDevice DefaultDevices'
"
No other class instance variables are inherited by this class.
@@ -32,7 +32,7 @@
copyright
"
COPYRIGHT (c) 1990 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -65,26 +65,26 @@
To print:
- |p|
+ |p|
- p := Printer new.
- p notNil ifTrue:[
- p nextPutAll:'hello world'; cr.
- p nextPutAll:' ...'; cr.
- p close
- ].
+ p := Printer new.
+ p notNil ifTrue:[
+ p nextPutAll:'hello world'; cr.
+ p nextPutAll:' ...'; cr.
+ p close
+ ].
See users of the Printer global variable for more examples.
[class variables:]
- PrintCommand <String> UNIX only: the operatingSystem command for printing.
- Usually something like 'lp' or 'lpr'
+ PrintCommand <String> UNIX only: the operatingSystem command for printing.
+ Usually something like 'lp' or 'lpr'
- PrintDevice <String> VMS only: the printers device.
- Usually something like 'sys$print:'
+ PrintDevice <String> VMS only: the printers device.
+ Usually something like 'sys$print:'
[author:]
- Claus Gittinger
+ Claus Gittinger
"
! !
@@ -98,12 +98,13 @@
DefaultCommands := #(
'lpr'
'lpr -P<your-printer>'
- 'cat | rsh <printHost> lpr -h'
- 'cat >xxx ; gv xxx'
- 'cat > printfile'
+ 'rsh <printHost> lpr -h'
+ 'cat >preview.ps ; gv preview.ps'
+ 'cat >printfile'
+ 'gs -q -DNOPAUSE -sDEVICE=pdfwrite -sOutputFile=/tmp/preview.pdf -'
'a2ps'
'a2ps | rsh <printHost> lpr -h'
- 'a2ps > printfile'
+ 'a2ps >printfile'
).
].
@@ -130,14 +131,14 @@
DefaultPageFormats isNil ifTrue:[
"/ UnitConverter must support all of them.
self defaultPageFormats:#(
- 'letter'
- 'legal'
- 'ledger'
'a3'
'a4'
'a5'
'a6'
'b5'
+ 'letter'
+ 'legal'
+ 'ledger'
).
].
@@ -155,6 +156,7 @@
"
DefaultPageFormats := nil.
+ DefaultCommands := nil.
PrintCommand := nil.
PrinterStream initialize
"
@@ -200,12 +202,12 @@
return a list presented as possible commands for printing
(in the launchers printer configuration).
This list can be set from the startup script with:
- PrinterStream defaultCommands:#( ... )"
+ PrinterStream defaultCommands:#( ... )"
DefaultCommands isNil ifTrue:[
- self == PrinterStream ifFalse:[
- ^ self superclass defaultCommands
- ]
+ self == PrinterStream ifFalse:[
+ ^ self superclass defaultCommands
+ ]
].
^ DefaultCommands
@@ -217,7 +219,7 @@
set the list which will be presented as possible commands for printing.
(shown in in the launchers printer configuration).
This can be done from the startup script with:
- PrinterStream defaultCommands:#( ... )"
+ PrinterStream defaultCommands:#( ... )"
DefaultCommands := collectionOfCommandStrings
@@ -229,12 +231,12 @@
return a list presented as possible devices for printers.
(in the launchers printer configuration).
This list can be set from the startup script with:
- PrinterStream defaultDevices:#( ... )"
+ PrinterStream defaultDevices:#( ... )"
DefaultDevices isNil ifTrue:[
- self == PrinterStream ifFalse:[
- ^ self superclass defaultDevices
- ]
+ self == PrinterStream ifFalse:[
+ ^ self superclass defaultDevices
+ ]
].
^ DefaultDevices
!
@@ -309,9 +311,9 @@
"return the landscape setting"
Landscape isNil ifTrue:[
- self == PrinterStream ifFalse:[
- ^ self superclass landscape
- ]
+ self == PrinterStream ifFalse:[
+ ^ self superclass landscape
+ ]
].
^ Landscape
!
@@ -374,9 +376,9 @@
settings menu."
PrintCommand isNil ifTrue:[
- self == PrinterStream ifFalse:[
- ^ self superclass printCommand
- ]
+ self == PrinterStream ifFalse:[
+ ^ self superclass printCommand
+ ]
].
^ PrintCommand
@@ -407,9 +409,9 @@
settings menu."
PrintDevice isNil ifTrue:[
- self == PrinterStream ifFalse:[
- ^ self superclass printDevice
- ]
+ self == PrinterStream ifFalse:[
+ ^ self superclass printDevice
+ ]
].
^ PrintDevice
!
@@ -497,7 +499,7 @@
Redefined to allow individual character translation in subclasses"
count timesRepeat:[
- self nextPut:aCharacter
+ self nextPut:aCharacter
]
"Created: 10.4.1996 / 13:08:13 / cg"
@@ -862,7 +864,7 @@
!PrinterStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/PrinterStream.st,v 1.56 2002-10-25 11:32:04 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/PrinterStream.st,v 1.57 2002-10-25 15:03:19 stefan Exp $'
! !
PrinterStream initialize!