Gergely
Gergely

Reputation: 7545

Converting postscript to pdf

Following

Converting correctly pdf to ps and vice-versa

I used the following command to convert a postscript file to pdf:

gs   -o output.pdf   -sDEVICE=pdfwrite   -dPDFSETTINGS=/prepress   -dHaveTrueTypes=true   -dEmbedAllFonts=true   -dSubsetFonts=false   -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams"   -f mu-calc.ps

but I got an error (I got the same error with ps2pdf):

GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefinedfilename in (mu-calc.ps) Operand stack:

Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push Dictionary stack: --dict:1167/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Last OS error: Permission denied GPL Ghostscript 9.06: Unrecoverable error, exit code 1

I tried various other options at

Ghostscript: "Unrecoverable error: undefinedfilename in setpagedevice"

but I always got the same error.

How can I make it work?

Upvotes: 2

Views: 13447

Answers (2)

Khizer But
Khizer But

Reputation: 11

There is permission problem. Open the command prompt with administrator rights.

Upvotes: 0

Gergely
Gergely

Reputation: 7545

It turned out that the file mu-calc.ps had no access rights on the Linux machine.

The error message

/undefinedfilename

was not precise, but this is because of the age of the postscript language, as the comment above explains. At that time, filesystems did not have file permissions.

Upvotes: 0

Related Questions