fechuny@aix01.aix.rpi.edu (felix chung yau) (05/02/91)
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. Then I decided to try ami pro. Everything came out perfect. However, I would rather not import all my files to ami pro as formating is lost and for large documents it would be tedious to reformat them. In addition, ami pro does not import equations (it has no equation editor of its own anyway). 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). Has anyone encountered problems fo this sort? Any help is appreciated. Please send answers via e-mail to fechuny@aix01.aix.rpi.edu or post. Thanks in advanced. .
rkim@sdcc13.ucsd.edu (Suro) (05/02/91)
In article <s_2gwwc@rpi.edu> 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. > [stuff deleted, obviously] That's really strange. I never had problems like that, and I also use sun (running sunos 4.1) and also this vax (running 4.3) I'm writing this article from. I also use Moke v1.1 and use jenscript and print from the sun, attached to apple laserwriter without any problems. The sun is, among its activities, a server to 5-6 (I forget how many) pc's running pc-nfs, and all connected via ethernet and connected to the main campus. To print wp ps files on this machine, I use a small program provided by the system operaters called wplaser (see below): ---------------------------CUT-------------------------------------- #!/bin/sh # # wplaser # # This script is for MS-DOS WordPerfect PostScript files. # A "%!PS-Adobe-" is added to the start of each file. # Writes to standard output. # 2 Sept 87 # # Modification History # KHE October, 1987 UCSD. Coverted from csh to sh and # added filename error checking # stdinput=0 # initialize flag if [ $# -gt 0 ] # check for arguments (file names) then filelist=$* else cat > /tmp/wplaser$$ # otherwise read from std input filelist=/tmp/wplaser$$ stdinput=1 # set flag on fi for file in $filelist do if test -r $file then # Add a %!PS-Adobe to the head of each file. echo %\!PS-Adobe- | cat - $file | tr -d '\004' else # filename was bad echo "$0: cannot access $file" 1>&2 fi if test $stdinput -eq 0 then shift # shift right to next argument else exit 0 # exit after 1 file (std input) fi done # end of for-do loop exit 0 # normal exit ---------------------CUT----------------------------------------- I do believe there is something going wrong when you transfer your wp file to your unix machine. -- Robert W. Kim rkim@ucsd.edu University of California, San Diego. kimbob@ucsd.edu "I'd love to go out with you, but I have to floss my cat."
fechuny@aix01.aix.rpi.edu (felix chung yau) (05/03/91)
Thank you to all the responses. It is really nice to find people who like to help others. The solution to my problem was rather simple. In using kermit to transfer the files I neglected to make sure that the host was setup to receive the file as binary. In kermit this is done by the "-i" switch to allow the file to be sent unaltered. This solved my WP problems. However, the Ami Pro ps file did not have any problems even though the file was not of the same size after transfering. I looked at the ps files generated by WP and Ami Pro and they looked rather different. Isn't postscript language standardized so that two ps files for a given document generated by different software be the same? Again, thank you everyone for your help. Felix
baldwin@usna.NAVY.MIL (J.D. Baldwin) (05/03/91)
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
fechuny@aix01.aix.rpi.edu (felix chung yau) (05/03/91)
On my previous post I had mentioned that the solution to my problem was using the "-i" switch in kermit. That was by no means the only answer I got. It happens to be the one that worked at the time. All the other solutions including the one you mention, Mr. Baldwing, probably work as well. I will cetainly keep in mind all the suggestions I got in the event I get the same problem again in the future. Felix