eap@bu-it.bu.edu (Eric A. Pearce) (05/17/91)
(I don't know too much about PostScript, so please bear with me) I'm trying to modify the "breakpage" for a DEC LPS-20 TCP/IP Printserver. It's just a text file that is downloaded from a normal Unix machine for every job. The printer expects to find a procedure called "Banner" in the breakpage. I have a bitmap that prints fine in a "standalone" program, but when I enclose it in a procedure and try to call it, I get "++rangecheck: Argument out of bounds - offending command is get". Am I exceeding some limit of the stack since it's now having to put the whole bitmap on it as opposed to just reading it from a file and executing it right away? My next idea was to enclose it in "[]" brackets, which worked, but my other functions failed to produce any output unless they were also enclosed in square brackets. The breakpage is expected to get job specific information from the printer at run time, when I enclosed this procedure in "[]" (trying to get it to show something), i.e. /CHostName exch def % to get hostname from printer I get "stackunderflow: Operand stack underflow - offending command is exch" I have a "Title" procedure that makes some grey bars, the "RealBanner" procedure prints out job-specific data and the "Seal", which is the bitmap of the University seal. This is frustrating since I have all the components working fine by themselves, but they break when called from the same procedure. I assume the real problem is trying to use the in-line bitmap data in a procedure? This the bitmap part of the job: %! /Banner { Title RealBanner Seal showpage } def /Seal { /rlestr1 1 string def /rlestr 128 string def /readrlestring { currentfile rlestr1 readhexstring pop 0 get dup 127 le { currentfile rlestr 0 4 3 roll 1 add getinterval readhexstring pop } { 256 exch sub dup currentfile rlestr1 readhexstring pop 0 get exch 0 exch 1 exch 1 sub { rlestr exch 2 index put } for pop rlestr exch 0 exch getinterval } ifelse } bind def 445 662 translate % move to lower left corner of box 63 63 scale % scale box 264 265 1 % width height bits/sample [ 264 0 0 -265 0 265 ] % transformation matrix { readrlestring } % proc image 80ffeeff04fe0000003fe5ff00fefb00003fe6ff00c0fb000003e7ff00f8 . . <stuff deleted> . e7ff00c0fb000003e6ff00fefb00003fe4ff038000007ff2ff } def Thanks in advance -e -- ------------------------------------------------------------------------- Eric Pearce eap@bu-it.bu.edu Boston University Information Technology 111 Cummington Street Boston MA 02215 617-353-2780 voice 617-353-6260 fax