Re: conversion of ctrans PS output to Adobe PS

From: NCAR G Talk (ncargt AT unknown)
Date: Tue Jan 30 1996 - 15:12:05 MST


> Dear NCAR_graphics users,
>
> I have a postscript file generated by ctrans - but when I try to view
> it on ghostview, it does not show page numbers but I can see
> the pages by clicking on the next page button on the ghostview.
>
> The files has many pages of graphics and I want to print just a few
> by marking the pages in ghostview but that I cannot do since it doesn't
> show pagenumbers - so I have to print the entire document which takes
> 45 minutes.
>
> Ghostview does not show page number because the ps generated by ctrans is
> not in Adobe format. I am wondering if someone knows how to generate
> Adobe ps thru ctrans or convert the ps file to adobe format ps ?
>
> Regards,
> Kishan
>

Dear Kishan and NCARG-talkers,
   
In fact ctrans does produce PostScript that is fully conformant with
the PostScript as defined in the Adobe Reference Manuals. What ctrans
does not produce is PostScript in conformance with the (optional)
Adobe Structuring Conventions (DSC). Among other things, the DSC
demark pages and this is what Ghostview is looking for that is not
there. The easiest way around the problem is to produce the
PostScript directly using one of the PostScript drivers in NCAR
Graphics version 4.0, since these do produce PostScript conforming to
the DSC.

If you have the patience, you can edit the PostScript coming from
ctrans to put in the required PostScript comments. You could write a
script to do this. You need to do three things:

  1.) Replace the first line:

         %!PS

       with:

         %!PS-Adobe-2.0

  2.) After the line:

         ct 239 [0.169 0.086 0.000] put

       insert:

         %%Page: 1 1

  3.) After each subsequent line:

          h

       insert lines:

         %%Page: n n

       where "n" is the appropriate page number in sequence.

The earlier suggestion to ncarg-talk to use "psselect" will not work,
since "psselect" is looking for the same page markers that ghostview
is looking for.

--NCAR Graphics Support



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:44:54 MDT