home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-07 | 8.6 KB | 396 lines | [TEXT/3M16] |
- %!
- % 3M Rainbow PS Startup
-
- % (c) Copyright 1994 3M
- % (c) Copyright 1990-1994 Adobe Systems Incorporated.
- % All rights reserved.
-
- % Patents Pending
-
- % NOTICE: All information contained herein is the property of
- % Adobe Systems Incorporated. Many of the intellectual and
- % technical concepts contained herein are proprietary to Adobe,
- % are protected as trade secrets, and are made available only to
- % Adobe licensees for their internal use. Any reproduction or
- % dissemination of this software is strictly forbidden unless
- % prior written permission is obtained from Adobe.
-
- % PostScript and Display PostScript are trademarks of Adobe Systems
- % Incorporated which may be registered in certain jurisdictions.
-
- %
- % Main startup job.
- %
-
- currentpacking
- true setpacking
-
- currentglobal
- true setglobal
-
- %
- % The default color rendering dictionary is only suitable for a
- % monochrome device. Switch to a sample rendering suitable for a color
- % device if the process color model is DeviceRGB or DeviceCMYK
- %
-
- % remember the current default monochrome colorrendering
-
- /MonochromeColorRendering currentcolorrendering /ColorRendering defineresource pop
-
- % select a default colorrendering based upon ProcessColorModel
-
- currentpagedevice dup /ProcessColorModel known {
- /ProcessColorModel get /DeviceGray ne
- {
- /DefaultColorRendering % key
- /3MRainbowCRD /ColorRendering findresource % instance
- /ColorRendering % category
- defineresource pop
- } if
- }{
- pop % currentpagedevice dict
- } ifelse
-
- setglobal
-
- %
- % Delete the media size and tray definitions not supported by this product.
- %
-
- % Product initially includes:
- % letter, lettersmall, legal, ledger, 11x17, a4, a3, a4small, b5, note
-
-
- [/legal /ledger /b5] {
- userdict exch undef
- } forall
-
- % Product initially includes:
- % lettertray, legaltray, ledgertray, a3tray, a4tray, b5tray, 11x17tray
-
- [/legaltray /ledgertray /b5tray] {
- statusdict exch undef
- } forall
-
- %
- % Define Default OutputDevice resource.
- %
-
- currentglobal
- true setglobal
-
- /Default <<
- /PageSize [[858.24 1236.48]]
- /ManualSize [[858.24 1236.48]]
- /HWResolution [[300.0 300.0]]
- >> /OutputDevice defineresource pop
-
- /Printer <<
- /PageSize [[612 792] [842 1191] [595 842] [858.24 690.24] [858.24 1236.48]]
- /ManualSize [[612 792] [842 1191] [595 842] [858.24 690.24] [858.24 1236.48]]
- /HWResolution [[300.0 300.0]]
- >> /OutputDevice defineresource pop
-
- setglobal
-
- %
- % Files captured on a PC may contain one or more ^D characters to mark EOF.
- % These character are part of the communication protocol and not part of the
- % PostScript language. The following code defines a procedure for ^D which
- % simply issues a warning and effectively discards the character.
- %
-
- (\004) cvn
- {
- } bind def
-
-
- (\032) cvn
- {
- } bind def
-
- %
- % To change the font which is substituted for missing fonts, uncomment the
- % line below and change "/Courier" to be "/YourSubstituteFontname".
- %
-
- currentglobal
- true setglobal % This is important for Kanji
- $error /SubstituteFont {
- 128 string dup 0 (MissingFont: ) putinterval dup 3 -1 roll
- 100 string cvs 13 exch putinterval
- /CPSI /ProcSet findresource begin
- () externalcommand pop pop
- end
- /Courier
- } put
- setglobal
-
- %
- % Initialize Kanji resources, if any are available.
- %
-
- mark
- {
- /Kanji /ProcSet findresource
- /initialize get exec
- } stopped
- cleartomark % Ignore errors.
-
- setpacking
-
- %
- % To save memory, no fonts are initially in FontDirectory.
- % Applying findfont to the standard set loads enough to define the font
- % but does not load all of the individual character definitions.
- % This can be important because performace can suffer if a document uses
- % save/restore around each page and the first reference to font is within
- % the save/restore, which cause the font to be reloaded for each page.
- %
-
- [
- /Times-Roman /Helvetica /Courier /Symbol
- /Times-Italic /Helvetica-Oblique /Courier-Oblique
- /Times-Bold /Helvetica-Bold /Courier-Bold
- /Times-BoldItalic /Helvetica-BoldOblique /Courier-BoldOblique
- ] {
- findfont % Locate the font definition
- pop % Discard the dictionary
- } forall
-
- %
- % Clean up userdict after loading fonts
- %
-
- [/| /|- /-| /RD /ND /NP] {
- dup userdict exch known {
- userdict exch undef
- }{
- pop
- } ifelse
- } forall
-
-
- %
- % **** Begin section to add 3M Specific commands to PostScript ****
- %
-
- userdict begin
-
- %
- % New commands to change to CMYK and Grayscale modes
- %
-
- /mmmSetupGrayscaleMode {
- % Change CPSI's Color Model
- << /ProcessColorModel /DeviceGray >> setpagedevice
-
- % Change the Color Rendering resource
- /DefaultColorRendering % key
- /MonochromeColorRendering /ColorRendering findresource % instance
- /ColorRendering % category
- defineresource pop
- } bind def
-
- /mmmSetupCMYKMode {
- % Change CPSI's Color Model
- << /ProcessColorModel /DeviceCMYK >> setpagedevice
-
- % Change the Color Rendering resource
- /DefaultColorRendering % key
- /3MRainbowCRD /ColorRendering findresource % instance
- /ColorRendering % category
- defineresource pop
- } bind def
-
- %
- % Page size operators for compatibility with Rainbow Level 1.
- %
-
- % Define the WB command
- /WB {
- <<
- /PageSize [858.24 1236.48]
- /ImagingBBox null
- /Policies <<
- /PolicyNotFound 1
- /PageSize 7
- /ProcessColorModel 0
- /NumCopies 1
- >>
- >> setpagedevice
- } bind readonly def
-
- % Change the /PageSize policy in the setpage and setpageparams definitions
-
- statusdict begin
- /setpageparams load
- mark exch
- aload pop
- 3 -1 roll
- mark exch
- aload pop
- 4 -1 roll
- pop 7 % New Policy
- 4 1 roll
- ] cvx
- 3 1 roll
- ] cvx /setpageparams exch def
-
- /setpage load
- mark exch
- aload pop
- 3 -1 roll
- mark exch
- aload pop
- 4 -1 roll
- pop 7 % New Policy
- 4 1 roll
- ] cvx
- 3 1 roll
- ] cvx /setpage exch def
- end
-
- % Destroy Adobe's setdefaulttimeouts command and substitute
- statusdict /setdefaulttimeouts undef
- /setdefaulttimeouts { pop pop pop } bind readonly def
-
-
- %
- % Concatinate strings.
- % [obj1] [obj2] mark (str1) (str2) ... (strn) stringcat [obj1] [obj2] compstr
- %
-
- /stringcat {
- counttomark /stringcount exch def
- /totallength 0 def
- stringcount copy
- stringcount { length /totallength exch totallength add def } repeat
- /compstr totallength string def
- /strpos totallength def
- stringcount {
- dup length /strpos exch neg strpos add def
- compstr strpos 3 -1 roll putinterval
- } repeat
- pop
- compstr
- } bind def
-
- %
- % Redefine the copypage and showpage functions to handle multiple copy
- % capabilities.
- %
-
- /copystr 10 string def
- /*showpage /showpage load def
- /showpage {
- /CPSI /ProcSet findresource begin
- statusdict begin
- /SaveCopies #copies def
- #copies 0 gt {
- mark (NumCopies: ) #copies copystr cvs stringcat () externalcommand pop pop
- /#copies 1 def
- } if
- *showpage
- /#copies SaveCopies def
- end % statusdict
- end % CPSI Procset
- } bind def
-
- /*copypage /copypage load def
- /copypage {
- /CPSI /ProcSet findresource begin
- statusdict begin
- (NumCopies: 1) () externalcommand pop pop
- *copypage
- end % statusdict
- end % CPSI Procset
- } bind def
-
- %
- % Do not allow a flatness setting larger than 3 pixels
- %
-
- /*setflat /setflat load def
- /setflat {
- dup 3.0 gt {
- (%%[ Warning: ") print =string cvs print
- ( setflat" is inappropriate at 300 dpi; using "3.0 setflat" ]%%\r\n) print
- flush
- 3.0
- } if
- *setflat
- } bind def
-
-
- %
- % Define Separation definition commands
- %
-
- /mmmBeginYellow {
- /CPSI /ProcSet findresource begin
- (BeginYellow) () externalcommand pop pop
- end % CPSI ProcSet
- } bind def
-
- /mmmBeginMagenta {
- /CPSI /ProcSet findresource begin
- (BeginMagenta) () externalcommand pop pop
- end % CPSI ProcSet
- } bind def
-
- /mmmBeginCyan {
- /CPSI /ProcSet findresource begin
- (BeginCyan) () externalcommand pop pop
- end % CPSI ProcSet
- } bind def
-
- /mmmBeginBlack {
- /CPSI /ProcSet findresource begin
- (BeginBlack) () externalcommand pop pop
- end % CPSI ProcSet
- } bind def
-
- /mmmBeginUnknown {
- /CPSI /ProcSet findresource begin
- (BeginUnknown) () externalcommand pop pop
- end % CPSI ProcSet
- } bind def
-
-
- end % userdict
-
- %
- % Set System Defaults
- %
-
- <<
- /MaxScreenStorage 204800
- >> setsystemparams
-
- <<
- /Policies <<
- /PolicyNotFound 1
- /PageSize 7
- /ProcessColorModel 0
- /NumCopies 1
- >>
- >> setpagedevice
-
- currentsystemparams begin
- 2 dict dup dup
- /MaxSourceList RamSize 5 mul 10 idiv dup 260000 lt { pop 260000 } if put
- /MaxDisplayList RamSize 1 mul 10 idiv dup 260000 lt { pop 260000 } if put
- end
- setsystemparams
-
- currentcolortransfer setcolortransfer
- {dup dup mul mul 0.5 mul} setblackgeneration
- {pop 0} setundercolorremoval
-
-
- %
- % End of 3M Rainbow startup file
- %
-