[comp.lang.postscript] PageMaker4 PostScript problems

zoetrop@ucscb.UCSC.EDU (Devan zoetrope MacFarlane) (01/15/91)

In article <11053@darkstar.ucsc.edu> zoetrop@ucscb.ucsc.edu (Devan zoetrope MacFarlane) writes:
>

Sorry about the blank msg. It would seem as though my newsfeed is a little
messed up right now ...

	| suicide    is    painless | zoetrop@ucscb.UCSC.EDU |
	| it brings on many changes | 6 7 0 3   e .  zayante |
	| and   i   can   take   or | felton,  ca  9 5 0 1 8 |
	| leave   it  if  i   please| ( 408 )   335  -  2401 |
	| -- suicide is painless -- | ( 408 )   335  -  5753 |

zoetrop@ucscb.ucsc.edu (Devan zoetrope MacFarlane) (01/15/91)

I recently generated some PostScript script from my copy of PageMaker4.0
(for the Mac). However, there now seems to be problems with the generated
code. Since I have little experience in this subject, I'll post the problem
as it was reported:

---
OK, I've found out the problem with the special characters printing wrong.
When I looked at the PostScript yesterday, I noticed that the character was
being called up with an octal notation, ie, \322.  According to my book, that
prints out a nonexistant character.  But, I was getting a character hin the same
 posiion, less the upper place.  The vi editor will display a cI chset by doing 
a \xxx.  That fooled me uto change it and discovered that it was a single charac
ter, not 4 characters.

Your pagemaker is defining the missing characters and calling for them with
8-bit codes, which is against all of the rules (well some of them).  Unix
machines are 7-bit devices, which caused the top bit to be lopped off and
the character printed from the lower half of the character set.  I solved
it here by editing all of the 8-bit characters and replacing them with the
correct PostScript octal call (\xxx).  You need to talk with someone regarding
this problem.  Ask some net users if they know of a way around it, ie, someway
to tell Pagemaker to use octal instead of 8-bit characters.
[...]
MB
-- 
      harvard\     att!nicmad\        spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INET:<@spool.cs.wisc.edu,@astroatc:brown@vidiot>
---

Any help you can offer me on this problem is greatly appreciated (Does anyone
have any *NIX utilities to do the change automatically? Or a util. for the Mac
to do the change?).

Thanks in advance.

        | suicide    is    painless | zoetrop@ucscb.UCSC.EDU |
        | it brings on many changes | 6 7 0 3   e .  zayante |
        | and   i   can   take   or | felton,  ca  9 5 0 1 8 |
        | leave   it  if  i   please| ( 408 )   335  -  2401 |
        | -- suicide is painless -- | ( 408 )   335  -  5753 |

glenn@heaven.woodside.ca.us (Glenn Reid) (01/16/91)

In article <11057@darkstar.ucsc.edu> zoetrop@ucscb.ucsc.edu (Devan zoetrope MacFarlane) writes:
>Your pagemaker is defining the missing characters and calling for them with
>8-bit codes, which is against all of the rules (well some of them).  Unix
>machines are 7-bit devices, which caused the top bit to be lopped off and
>the character printed from the lower half of the character set.  I solved
>it here by editing all of the 8-bit characters and replacing them with the
>correct PostScript octal call (\xxx).

>Any help you can offer me on this problem is greatly appreciated (Does anyone
>have any *NIX utilities to do the change automatically? Or a util. for the Mac
>to do the change?).

Here is a very simple C program that will find characters with the eighth
bit set and replace it with the \xxx notation.  Note that the PostScript
language convention recognizes the \xxx only within string bodies, but it
shouldn't hurt to replace all the 8-bit characters (unless there are 8-bit
characters used in PostScript names somewhere in the code, which I very
much doubt unless it came from a non-English-language system).

--- cut here ----

#include <stdio.h>

/* reads from stdin, writes to stdout, replaces 8-bit characters with
   7-bit equivalent expression using PostScript \xxx standard notation */

main ()
{
    int ch;
    short cont;

    cont = 1;
    while ( cont ) {
	ch=getchar();
	cont = (ch != EOF);
	if ( cont ) {
	    if ( ch > 127 ) {
		printf ( "\\%3o", ch );
		fprintf ( stderr, "\\%3o\n", ch );
	    } else {
		putchar ( ch );
	    }
	}
    }
}

-- 
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		NeXT/PostScript developers
 ..{adobe,next}!heaven!glenn		415-851-1785 (fax 851-1470)