1
votes

I have several Postscript files I need to convert to PDF for work. (No I cannot send you the PS files, it's confidential).

They were created using Adobe 3.0 standards : (%!PS-Adobe-3.0

%%Creator: Emtex - vdd2ps 212.5.1)

So i need to invoke ps2pdf12.

When I try ps2pdf12 test.ps output.pdf I get this : "Error: /undefined in ps2pdf12 Operand Stack:

Execution stack : %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- %loop_continue --n ostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval -- Dictionary stack: --dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Current file position is 9 "

I run the script using GhostScript 9.05 or 9.20 and I get the same error.

I also tried using directly ghostScript with things like "gs -o "output.pdf" -sDEVICE=pdfwrite -dCompatibilityLevel=1.2 -r=720 "test.PS" " but I get the same mistakes.

When I am in Ghostview to watch my PS and I go to File-->Convert and I choose pdfwrite and resolution = 720, I get the pdf...

Any ideas where my problem come from?

Thanks in advance

2
I say, if ghostview does manage, then there is most likely a gs command line that will do it too. Is the outcome of ghostview also pdf 1.2? Does it work if you omit the CompatibilityLevel? - Stefan Hegny
Il tried with several compatibility level, i tried without it and did get the same error. How do i see the fact in ghostview ? With acrobate distiller, it is converting but logos inside the documents are unreadable or just a black line because it is only starting from adobe 4.0 - J. Vanbergen

2 Answers

0
votes

If the PostScript program causes Ghostscript to throw an error, then the PostScript program is most likely defective.

I'm afraid that the fact that the file begins with %!PS-Adobe-3.0 doesn't mean much. That is actually supposed to be the version of the Document Structuring Convention which the program is compatible with, but unfortunately many PostScript producers don't understand that, and thinking that it just means 'this is a PostScript file' stick it on the front. SO you can't read anything from it.

I'm afraid that if you can't share an example of the program then there is, frankly, almost nothing anyone can do to help. My guess (and that's all it is without seeing an example) is that the PostScript is broken.

0
votes

After several tries and checks with GSView, i managed to get the following quote and it seems to work fine.

gswin32c.exe -o "output.pdf" -dNOSAFER -sDEVICE=pdfwrite -r720 -dAutoRotatePages=false -dCompatibilityLevel=1.2 -dUseFlateCompression=true -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dNumRenderingThreads=2 -c "60000000 setvmthreshold" -f -dEPSCrop "test.PS"

Thanks for your help :)