fighting pstoedit

I wanted to convert text to curves in PostScript. The well-known tool to do it is pstoedit (alternatives are welcome). Unfortunately, it worked only partially.

This works:

$ pstoedit -f ps -dt test.eps flattened.ps

But this doesn't (I want 600 DPI, not the default 72 DPI):

$ pstoedit -f ps -dt -psarg "-r600x600" test.eps flattened.ps

Well, actually it works, but PostScript tools reject the file "flattened.ps":

Error: /typecheck in --restore--
Operand stack:
   --nostringval--   0   0   0   0   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval-- 
   --nostringval--   2   %stopped_push   --nostringval--   --no
   stringval--   --nostringval--   false   1   %stopped_push   
   1889   1   3   %oparray_pop   1888   1   3   %oparray_pop   
   1872   1   3   %oparray_pop   1755   1   3   %oparray_pop   
   --nostringval--   %errorexec_pop   .runexec2   --nostringval
   --   --nostringval--   --nostringval--   2   %stopped_push  
   --nostringval--   1818   5   3   %oparray_pop   --nostringva
   l--   1802   5   3   %oparray_pop   --nostringval--
Dictionary stack:
   --dict:1149/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--
Current allocation mode is local
GPL Ghostscript 8.62: Unrecoverable error, exit code 1

I tried a lot of approaches and tools. The best seems: filter the generated PostScript through the tool eps2eps three (!) times. Unfortunately, Adobe Illustrator ignores the bounding box of such EPS-files. Therefore, it's not a solution for me.

The final solution is a dirty hack:

* Download pstoedit source code.
* In the file "src/pstoedit.ph" change all "72" (except "72 pscover") to "600" (or any other desired DPI).
* Compile as usual.
* Use the custom version.

25 Sep 2009, update

On a older PC with an older "gs" (for example, 7.07.1), one has also to update and use "gs":

$ GS=.../ghostscript-8.63/opt/bin/gs .../pstoedit-3.45/opt/bin/pstoedit -f ps -dt input.eps outlined.eps

Categories: publishing

Updated: