Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!usna!baldwin From: baldwin@usna.NAVY.MIL (J.D. Baldwin) Newsgroups: comp.os.msdos.apps Subject: Re: WordPerfect and postscript files Message-ID: <372@usna.NAVY.MIL> Date: 3 May 91 12:57:59 GMT References: Organization: Canoe U. Lines: 121 In the referenced article, fechuny@aix01.aix.rpi.edu (felix chung yau) writes: > Hello. I am having some problems printing a postscript file and was >wondering if anyone could help me. > The problem is this: I generate a ps file in wordperfect (dos version) >by writing to disk. Then I upload the ps file to a unix (sparc) machine which >has an apple laserwriter hook up to it. I issue the print command and all I >get is one page out of 2 or more pages. With ps files generated by lotus >freelance the problem is even worse as I get nothing at all. > I called the tech guys at wordperfect and the only answer they had >was that there might be problems in taking a file from one platform to another >(dos to unix). If that was literally the only answer they had, they might be right, but they were brain-dead not to suggest the following: If you have a bit-mapped image of some kind (usually from some imported graphic, especially a scanned image), your PS file can have some very, very long lines. You don't say whether this is the case, but it's worth looking into. How is this problem solved? Quite easily: just set your file type to "binary" instead of "ascii"--this shouldn't cause any problems with ASCII files, and will take care of any problems with too-long records in your transfer. Again, you don't say what type of "upload" you use, but I ftp files this way several times a day, both to a VAX/VMS system and a Sun print server. If *that* isn't the problem, the following PostScript program may be helpful to you. I got it off the net a while back, and it has solved many problems for me. Just send it to your printer as if you were printing it (it will produce no output), and from then until the next time the printer is shut off, it will produce output describing the PS error whenever a print job fails due to a PS syntax error. (I'm just posting it because it's quite short, and extremely helpful.) Good luck! The program follows my sig: -- From the catapult of: |+| "If anyone disagrees with anything I _,_J. D. Baldwin, Comp Sci Dept |+| say, I am quite prepared not only to _|70|___:::)=}- U.S. Naval Academy|+| retract it, but also to deny under \ / baldwin@cad.usna.navy.mil |+| oath that I ever said it." --T. Lehrer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Article 72078 of comp.lang.postscript: Path: usna!uunet!aplcen!samsung!cs.utexas.edu!execu!sequoia!rpp386!woody From: woody@rpp386.cactus.org (Woodrow Baker) Newsgroups: comp.lang.postscript Subject: Re: Debugging advice needed Summary: erhandlr Message-ID: <17755@rpp386.cactus.org> Date: 25 Jan 90 04:29:10 GMT References: <1990Jan24.142545.24543@cs.dal.ca> Organization: River Parishes Programming, Plano, TX Lines: 85 -----CUT HERE------------------------------- %! % lib/ehandler.ps -- Downloaded Error Break-page handler % Copyright (c) 1984 Adobe Systems, Inc. All Rights Reserved. % assumes serverloop password is the default one /$brkpage where {pop(Error Handler in place - not loaded again\n)print flush stop} {serverdict begin statusdict begin 0 checkpassword {(Error Handler downloaded.\n)print flush 0 exitserver} {(Bad Password on loading error handler!!!\n)print flush}ifelse end%statusdict }ifelse /$brkpage 64 dict def $brkpage begin /prnt {dup type/stringtype ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def currentpoint/toy exch def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show}bind def /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def /=={/cp 0 def typeprint nl}def /typeprint{dup type exec}readonly def /lmargin 72 def /rmargin 72 def /tprint {dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp exch def prnt}readonly def /cvsprint{=string cvs tprint( )tprint}readonly def /integertype{cvsprint}readonly def /realtype{cvsprint}readonly def /booleantype{cvsprint}readonly def /operatortype{(--)tprint =string cvs tprint(--)tprint}readonly def /marktype{pop(-mark- )tprint}readonly def /dicttype{pop(-dictionary- )tprint}readonly def /nulltype{pop(-null- )tprint}readonly def /filetype{pop(-filestream- )tprint}readonly def /savetype{pop(-savelevel- )tprint}readonly def /fonttype{pop(-fontid- )tprint}readonly def /nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def /stringtype {dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse }readonly def /arraytype {dup rcheck{dup xcheck {({)tprint{typeprint}forall(})tprint} {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse }readonly def /courier/Courier findfont 10 scalefont def end %$brkpage errordict/handleerror {systemdict begin $error begin $brkpage begin newerror {/newerror false store grestoreall initgraphics courier setfont lmargin 720 moveto(ERROR: )prnt errorname prnt nl(OFFENDING COMMAND: )prnt/command load prnt nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}repeat systemdict/showpage get exec(%%[ Error: )print errorname =print(; OffendingCommand: )print/command load =print( ]%%)= flush }if end end end}dup 0 systemdict put dup 4 $brkpage put bind readonly put -------------CUT HERE--------------------- Download to the printer. This will print out apage upon an error and show the stack. It is the only debugging tool that I have, and I flat could not get along without it. I'm sure there are better versions now. Cheers Woody