Results 1 to 3 of 3
Hi folks,
I have some technical documents on .pdf format download from Internet. They are allowed to download by filling personal information. I supposed they have been encrypted.
Each time ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-10-2005 #1Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,710
encrypted .pdf files
Hi folks,
I have some technical documents on .pdf format download from Internet. They are allowed to download by filling personal information. I supposed they have been encrypted.
Each time I have to re-filling in the same personal data before I can read the document. It is not convenient. Besides their contents can't be copied/pasted. Each time trying to highlight their text warning popup saying this operation not permitted.
I succeeded printing them as .ps files. However still I could not copy/paste their content. Running
# ps2pdf tmp_001.ps tmp_001.pdfI can open the .ps file with GIMP but could not re-save it as .pdf becuase .pdf format is not available on GIMP for saving.Code:This PostScript file was created from an encrypted PDF file. Redistilling encrypted PDF is not permitted. Error: /undefined in --get-- Operand stack: --nostringval-- --dict:88/200(L)-- quit 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-- 2 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1063/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)-- --dict:1063/1123(ro)(G)-- Current allocation mode is local GNU Ghostscript 7.07: Unrecoverable error, exit code 1
Kindly advise is there a way to decrypt the .pdf file not having to filling same personal data to read it.
TIA
BR
satimis
- 02-17-2007 #2Just Joined!
- Join Date
- Feb 2007
- Location
- Columbus, OH
- Posts
- 2
The problem is not in the .pdf files, but in the postscript generated by the Acrobat reader. The fix is simple: ghostscript should not let the acrobat-generated postscript know that it's writing a .pdf file.
Originally Posted by satimis
Here's how:
Look into /usr/share/ghostscript/*/lib/gs_pdfwr.ps. You'll need to edit this file as root.
Close to end of the file, there will be following lines:
All you have to do is replace /pdfwrite with something else, likeCode:% Patch 'where' so that the distiller operators are only visible % if the pdfwrite device is the current one. { currentdevice .devicename /pdfwrite eq { .where
I've used this method on various downloadable tax forms which are braindead enough not to allow saving with filled-in results. Some better forms (e.g. US federal forms) allow this as they have document rights assigned, but most do notCode:{ currentdevice .devicename /pdfwritexyz eq {
Cheers!
- 08-20-2008 #3Just Joined!
- Join Date
- Aug 2008
- Posts
- 1
Update
First, thank you SO MUCH for your help kuba, that's been a huge issue. I have Adobe Acrobat and needed a way to delete pages, redistill them so the files would be smaller, and make comments permanent (so they print regardless of the print settings), so I figured FreePDFXP, which I run on another computer, would get around this, but it obviously doesn't. I tried printing the file to a Microsoft XPS Document Writer which worked, but that's a hassle, and if I left it as an XPS, most people can't get XPS files to open, if they even have the software. One more awesome program from Microsoft

I tried your suggestion but instead of adding letters to the end of /pdfwrite, I had to add them in the middle, /pdfXYZwrite, because Ghostscript seemed to ignore the fact that it had extra letters on the end and still gave me the encryption error. Maybe this is a newer version or something, I just downloaded it today.
Thanks again!
DianaLast edited by wellsmall; 08-20-2008 at 08:30 PM. Reason: wrong user "thanked"



