[Thread Prev][Thread Next][Index]

Re: Problems with postscript created from 'gksm2ps'



Hi Gary,

I use the attached Unix Bourne shell script to convert one or more 
.plt files to eps, pdf, and png files (all at once).  The usage 
syntax is

   plt2all file1.plt file2.plt ...

It has worked for me on very large plt files.

-- Jim

On Thu, 2 Jun 2005, Wendy Wang wrote:

> Hi Gary,
> 
> Did you try GSview (http://www.ghostgum.com.au/index.htm)? 
> I can convert PS to EPS using GSview. 
> But you may not be able to insert a BIG eps into Word documents.
> 
> Wendy
> 
> At 15:33 2005-6-2, Gary Strand wrote:
> 
> >I've got a rather large (34 MB) metafile that FERRET 5.80 generated, and converting it with 'Fprint' or 'gksm2ps' works OK, however, I can't view or convert the resulting postscript file. 'gs' balks with:
> >
> >Error: /typecheck in --aload--
> >Operand stack:
> >   --nostringval--
> >Execution stack:
> >   %interp_exit   .runexec2   --nostringval--   --nostringval--   
> >--nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   
> >1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   
> >.runexec2   --nostringval--   --nostringval--   --nostringval--   2   
> >%stopped_push   --nostringval--   --nostringval--   --nostringval--   
> >--nostringval--
> >Dictionary stack:
> >   --dict:1062/1123(ro)(G)--   --dict:0/20(G)--   --dict:110/200(L)--
> >Current allocation mode is local
> >Current file position is 29314071
> >GNU Ghostscript 7.07: Unrecoverable error, exit code 1
> >
> >I'm trying to convert the ps file to eps, and none of the tools
> >I usually use work.
> >
> >Is there a tool somewhere out there that can look at/convert the
> >metafile other than 'gksm2ps'? Most of the tools I've found on
> >the Web are really old - mid-1990s, since the GKS Metafile
> >standard is somewhat dated.
> >
> >Thanks.
> >
> >Gary Strand
> >strandwg@ucar.edu
> >http://www.cgd.ucar.edu/ccr/strandwg
> 

-- 
======================================================================
   James Orr                      
   Laboratoire des Sciences du Climat et de l'Environnement
   Unite Mixte de Recherche CEA-CNRS

   LSCE, CEA Saclay                http://www.ipsl.jussieu.fr/~jomce
   Bat. 712 - Orme                 mailto:  orr@cea.fr
   F-91191 Gif-sur-Yvette Cedex    Phone:   (33) (0)1 69 08 77 23
   FRANCE                          Fax:     (33) (0)1 69 08 77 16
======================================================================
#!/bin/sh
#
# plt2all:  Converts plt file to eps, pdf, and png files
#
# Usage: plt2all file1.plt file2.plt ...
# ------
# J. Orr, LSCE/CEA 25 July 2002
#
  for file in $*
  do
      stem=`echo $file | sed s:\.plt::`
#     echo "Input, Output files:" $file "," $stem
      echo " "
      echo "Making from $file:"
      echo "---------------------------------------"
      gksm2ps -p portrait -l cps -d cps -R -o $stem.ps $file
      echo "1) $stem.ps (Postscript)"
      ps2epsi $stem.ps
      mv $stem.epsi $stem.eps
      echo "2) $stem.eps (Encapsulated Postscript)"
      epstopdf $stem.eps
      echo "3) $stem.pdf (Adobe PDF)"
      convert $stem.eps $stem.png
      echo "4) $stem.png (PNG)"
      echo "---------------------------------------"
  done

exit 0

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement