[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::postscript_printing

Title:Digital PostScript printers and their associated software
Moderator:REGENT::LASKOHER
Created:Wed Jan 24 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:7230
Total number of notes:31971

6657.0. "doclutimage and 2250?" by SIOG::FITZMAURICE () Fri Jun 14 1996 12:20

T.RTitleUserPersonal
Name
DateLines
6657.1SIOG::FITZMAURICEFri Jun 14 1996 12:284
6657.2File pointer pleaseNEWENG::ANDERSON_BFri Jun 14 1996 14:0320
6657.3SIOG::FITZMAURICEMon Jun 17 1996 05:2413
6657.4might be emulation of colorimageNEWENG::ANDERSON_BMon Jun 17 1996 10:4420
6657.52150 alosSIOG::FITZMAURICEMon Jun 17 1996 11:259
6657.6No 2150 eitherNEWENG::ANDERSON_BMon Jun 17 1996 13:2710
6657.7SIOG::FITZMAURICETue Jun 18 1996 11:325
6657.8REGENT::POWERSWed Jun 19 1996 10:1317
6657.9SIOG::FITZMAURICEWed Jun 19 1996 12:498
6657.10REGENT::POWERSThu Jun 20 1996 10:119
6657.11ACISS2::LENNIGDave (N8JCX), MIG, @CYOMon Mar 10 1997 17:0014
    Similar problem here with the following Teamlinks doc files:
    
         BOOKIE::TLWIN_DOCS:TLWIN_GS_V27.PS  (Getting Started)
         BOOKIE::TLWIN_DOCS:TLWIN_ADMIN_V27.PS  (Client Admin. Guide)
    
    Printing fails on both docs upon hitting the first bit of graphics
    (page 1-1 for the first file, page 2-4 for the second). They also 
    immediately fail if I try to use NUM=2 (something about "mysetup")
    
    These apparently started life as some flavor of MS Word documents.
    
    Is this a 2250 bug? Is there any workaround?
    
    Dave
6657.12WKRP::LENNIGDave (N8JCX), MIG, @CYOTue Mar 11 1997 08:3098
    I inspected the files in .-1, and found a blob of "interesting" ps code
    (attached). I don't have any docs on the postscript language, but it
    looks to me like it tests for the colorimage operator (among others?) 
    and then defines doclutimage in a number of differant ways depending
    upon the result of the test(s). Based upon reply .4 and my analysis,
    I tried a gross hack, which seems to have worked... I edited the .ps
    files and replaced all occurances of 'colorimage' with 'colorgronk'.
    
    Actually, I'll have to qualify "worked"; these ps files appear to be 
    a concatenation of a bunch of seperate ps files (one per chapter?). I
    extracted the first piece from the GS doc (up through the first ^D)
    and after the above edit, the print job completes normally. I'm not in
    the office so I can't report on what the output looks like, but at
    least it successfully got past the first few images in the file.
    
    Comments?
    	Dave
    
    An extract of what seemed to be the relevant bits...
    
%%BeginResource: file Pscript_Win_Utils 2.0 0
/|/def load def/,/load load |/~/exch , |/?/ifelse , |/!/pop , |/`/begin , |/^
/index , |/@/dup , |/+/translate , |/$/roll , |/U/userdict , |/M/moveto , |/-
/rlineto , |/&/currentdict , |/:/gsave , |/;/grestore , |/F/false , |/T/true ,
|/N/newpath , |/E/end , |/Ac/arc , |/An/arcn , |/A/ashow , |/D/awidthshow , |
/C/closepath , |/V/div , |/O/eofill , |/L/fill , |/I/lineto , |/-C/rcurveto ,
|/-M/rmoveto , |/+S/scale , |/Ji/setfont , |/Lc/setlinecap , |/Lj/setlinejoin
, |/Lw/setlinewidth , |/S/show , |/LH/showpage , |/K/stroke , |/W/widthshow ,
|/R/rotate , |/b{bind |}bind |/bd{bind |}bind |/xd{~ |}bd/ld{, |}bd/lw/Lw ld
/lc/Lc ld/lj/Lj ld/sg/setgray ld/L2? F/languagelevel where{! languagelevel 2
ge{! T}if}if |/g{@ not{U/DefIf_save save put}if U/DefIf_bool 2 ^ put}b
/DefIf_El{if U/DefIf_bool get not @{U/DefIf_save get restore}if}b/e{DefIf_El !
}b/self & |/reinitialize{[/TextInit/GraphInit/UtilsInit counttomark{@ where{
self eq}{F}?{cvx exec}{!}?}repeat cleartomark}b/initialize{`{/ADO_mxRot ~ |
/TextInitialised? F | reinitialize E}{U/Pscript_Win_Data 200 dict @ ` put
/ADO_mxRot ~ |/TextInitialised? F | reinitialize}?}b/terminate{!{& self eq{
exit}{E}?}loop E}b/suspend/terminate , |/resume{` Pscript_Win_Data `}b/snap{
transform 0.25 sub round 0.25 add ~ 0.25 sub round 0.25 add ~ itransform}b
/dsnap{dtransform round ~ round ~ idtransform}b<04>cvn{}|/setjn{{statusdict
/jobname known{statusdict/jobname 3 -1 $ put}if}stopped cleartomark}b/solid{[]
0 setdash}b/setdsh{0 setdash}b/colspRefresh{}b/rp{4 2 $ M 1 ^ 0 - 0 ~ - neg 0
-}b/rr{1 ^ 0 - 0 ~ - neg 0 - C}b
%%EndResource
%%BeginResource: file Pscript_Win_Utils_L1 2.0 0
L2? not g{/rf{N rp L}b/fx{1 1 dtransform @ 0 ge{1 sub 1}{1 add -0.25}? 3 -1 $
@ 0 ge{1 sub 1}{1 add -0.25}? 3 1 $ 4 1 $ idtransform 4 -2 $ idtransform}b/BZ{
4 -2 $ snap + +S fx rf}b/rs{N rp C K}b/rc{N rp clip N}b/sg{setgray}b/sco{
setrgbcolor}b/sgco{{sg}{sco}?}b}e
%%EndResource

%%BeginResource: file Pscript_Win_Co_Images_L1 2.0 0
L2? not g{/testsystemdict{where{systemdict eq{T}{F}?}{F}?}b/c 1 |/colorimage
where{! T}{F}?{/c 0 statusdict `/processcolors where{! ! processcolors}{
/deviceinfo where{! deviceinfo/Colors known{!{deviceinfo/Colors get}}if}if}? E
| c 0 ne{/colorimage testsystemdict/setcolortransfer testsystemdict
/currentcolortransfer testsystemdict/currentcmykcolor testsystemdict and and
and not{/c 0 |}if}if}if c @ 1 ne ~ @ 3 ne ~ 4 ne and and{/c 0 |}if c 1 eq g{
/expandbw{expandfactor mul round cvi bwclut ~ get 255 V}b/doclutimage{!/bwclut
~ | bpc @ 8 eq{! 255}{4 eq{15}{3}?}?/expandfactor ~ |[/expandbw ,/exec , @
currenttransfer ~]cvx bind settransfer iw ih bpc[iw 0 0 ih 0 0]s image}b}e c @
3 eq ~ 4 eq or g{/nullproc{{}}|/concatutil{/exec , 7 -1 $/exec ,}b/defsubclut{
1 add getinterval |}b/spconcattransfer{/Dclut ~ |/Cclut ~ |/Bclut ~ |/Aclut ~
|/ncompute ~ , | currentcolortransfer[{Aclut ncompute}concatutil]cvx[{Bclut
ncompute}concatutil]cvx[{Cclut ncompute}concatutil]cvx[{Dclut ncompute}
concatutil]cvx setcolortransfer}b/setuprgbcluts{/bit3x rgbclut length 3 sub |
/bit1x bit3x 3 idiv |/rclut rgbclut |/gclut rclut 1 bit3x defsubclut/bclut
rclut 2 bit3x defsubclut}b}e c 3 eq g{/3compute{~ bit3x mul round cvi get 255
V}b/doclutimage{/rgbclut ~ | ! setuprgbcluts/3compute rclut gclut bclut @
spconcattransfer iw ih bpc[iw 0 0 ih 0 0][s/exec ,/@ , @]cvx nullproc nullproc
T 3 colorimage}b}e c 4 eq g{/ftoint{1 ~ sub 255 mul round cvi}b/stuffclut{
cmykindex 3 -1 $ put}b/4compute{~ bit4x mul round cvi get 255 V}b
/invalidcolortable? T |/computecmykclut{setuprgbcluts/bit4x rgbclut length 3
idiv 4 mul 4 sub |/cmykclut bit4x 4 add string |/cclut cmykclut |/mclut cclut
1 bit4x defsubclut/yclut cclut 2 bit4x defsubclut/kclut cclut 3 bit4x
defsubclut/cmykindex 0 | 0 1 bit1x{@/cmykindex ~ bit1x ~ sub 4 mul | 3 mul @
rclut ~ get 255 V ~ @ gclut ~ get 255 V ~ bclut ~ get 255 V setrgbcolor
currentcmykcolor ftoint kclut stuffclut ftoint yclut stuffclut ftoint mclut
stuffclut ftoint cclut stuffclut}for}b/doclutimage{/rgbclut ~ | !
invalidcolortable?{computecmykclut}if/4compute cclut mclut yclut kclut
spconcattransfer iw ih bpc[iw 0 0 ih 0 0][s/exec ,/@ , @ @]cvx nullproc
nullproc nullproc T 4 colorimage}b}e c 0 eq g{/a{3 mul 3 getinterval
putinterval ~ 3 add ~ 3 copy}b/8lookup/a , |/4lookup{/byte 1 ^ | -4 bitshift a
byte 15 and a}b/2lookup{/byte 1 ^ | -6 bitshift a byte -4 bitshift 3 and a
byte -2 bitshift 3 and a byte 3 and a}b/colorexpand{mystringexp 0 rgbclut 3
copy 7 -1 $/mylookup , forall ! ! ! ! !}b/createexpandstr{/mystringexp ~
mystring length mul string |}b/doclutimage{/rgbclut ~ | !/mylookup bpc 8 eq{3
createexpandstr/8lookup}{bpc 4 eq{6 createexpandstr/4lookup}{12
createexpandstr/2lookup}?}? , | iw ih bpc[iw 0 0 ih 0 0][s/exec ,/colorexpand
,/exec ,]cvx F 3 colorimage}b}e/colorimage where{! T}{F}? g{/do24image{iw ih 8
[iw 0 0 ih 0 0]s F 3 colorimage}b}DefIf_El{/rgbtogray{/str ~ |/len str length
|/smlen len 3 idiv |/rstr str |/gstr str 1 len 1 sub getinterval |/bstr str 2
len 2 sub getinterval | str @ 0 1 smlen 1 sub{@ 3 mul rstr 1 ^ get 0.3 mul
gstr 2 ^ get 0.59 mul add bstr 3 -1 $ get 0.11 mul add round cvi put @}for ! 0
smlen getinterval}b/do24image{iw ih 8[iw 0 0 ih 0 0][s/exec ,/rgbtogray ,/exec
,]cvx bind image}b}e/doNimage{bpc 24 eq{do24image}{iw ih bpc[iw 0 0 ih 0 0]s
image}?}b}e
%%EndResource

6657.13WKRP::LENNIGDave (N8JCX), MIG, @CYOTue Mar 11 1997 10:5161
    An addendum to .11; as I mentioned, I also couldn't get these files to
    print using number_up=2. A bit of experimenting reveals that removal of
    %%BeginFeature %%EndFeature sequences allows the print job to complete.
    (however, as mentioned in .12, I haven't seen the final output yet)
    
    Can anyone hazard a guess as to what in particular in the attached is 
    triggering the "Name not known - offending command is mysetup" error 
    when I attempt to use the number_up option?
    
    Dave
    
%%BeginSetup 
[ 1.000 0 0 1.000 0 0 ] false Pscript_Win_Driver_Incr dup /initialize get exec

[{0 
/languagelevel where{pop languagelevel}{1}ifelse 2 ge{1 dict dup/JobTimeout  4 -1 roll put setuserparams}{statusdict/setjobtimeout get exec}ifelse 
} stopped cleartomark
[{240 
/languagelevel where{pop languagelevel}{1}ifelse 2 ge{1 dict dup/WaitTimeout 4 -1 roll put setuserparams}{statusdict/waittimeout 3 -1 roll put}ifelse 
} stopped cleartomark
[{

} stopped cleartomark
[{
%%BeginFeature: *InputSlot AutoSelect Tray

%%EndFeature
} stopped cleartomark
[{
%%BeginFeature: *PageSize Letter
statusdict /lettertray get exec
%%EndFeature
} stopped cleartomark
[{
%%BeginFeature: *OutputBin Upper
3 statusdict /setoutputtray get exec
%%EndFeature
} stopped cleartomark
[{
%%BeginFeature: *DECimage Off
false statusdict /setDECimage get exec
%%EndFeature
} stopped cleartomark
[{
%%BeginFeature: *DECimage controls Standard
0.0 1.0 0.0 1 statusdict /setDECimageparams get exec
%%EndFeature
} stopped cleartomark
[{
%%BeginFeature: *Duplex DuplexNoTumble
true statusdict /setduplexmode get exec false statusdict /settumble get exec
%%EndFeature
} stopped cleartomark
[{
%%BeginFeature: *Jog False
0 statusdict /setoutputposition get exec
%%EndFeature
} stopped cleartomark
1 setlinecap 1 setlinejoin 
/mysetup [ 0.240 0 0 -0.240 7.000 783.000 ] | 
%%EndSetup
6657.14the 4039 reference isn't very interesting in this regardREGENT::POWERSWed Mar 12 1997 08:5012
This is apparently a problem that reported three years ago in a QAR
on DCPS v1.1 (QAR 247).
There is a name collision between the DCPS layup dict and one of
the redefinitions of PostScript symbols in the Adobe code.
DCPS needs to intercept certain PS operators to change their behavior
for layup, and needs to put its own special dict atop the dict stack
to make this happen.  That's where the defs collide.

I don't know the resolution of QAR 247,
but there's also a reference to topic 4039 in this file in it.

- tom]