I want to convert my .ps file (which was created from an encrypted .pdf file) back to a .pdf format.
Using ps2pdf in ghostscript gives me the following message on my command prompt:
This PostScript file was created from an encrypted PDF file.
Redistilling encrypted PDF is not permitted.
Error: /undefined in
--eexec-- Operand stack: --nostringval-- --dict:89/200(L)-- quit Execution stack: %interp_exit .runexec2 --nostringval--
--nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1977 1 3 %oparray_pop 1976 1 3
%oparray_pop 1960 1 3 %oparray_pop 1852 1 3
%oparray_pop --nostringval-- %errorexec_pop .runexec2
--nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1843 2 3 %oparray_pop
--nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1198/1684(ro)(G)-- --dict:1/20(G)-- --dict:89/200(L)-- --dict:1198/1684(ro)(G)--
Current allocation mode is local Last OS error: No such file or directory
GPL Ghostscript 9.18: Unrecoverable
error, exit code 1Is there anyway to convert my .ps file back to .pdf if I know the password of the original encrypted .pdf file from which the .ps file was created?
72 Answers
You can open the .ps file in a text editor of your choice, find the line Removing the following eleven lines is illegal, subject to the Digital Copyright Act of 1998. and remove the following eleven lines, starting with mark currentfile eexec and ending with cleartomark, save and run ps2pdf.
Why don't you use imagemagick? Try this:
convert myfile.ps myfile.pdf
Hope it helps you
3