Ghostscript seems unable to read password protected PDF files. When I try I get this message: GPL Ghostscript 8.71 (2010-02-10) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. **** This file requires a password for access. **** The file was produced by: **** >>>> ¢äG>╩þÓ☻õ/"q´WwCðq´Ôm <<<< Error: /invalidfileaccess in pdf_process_Encrypt Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_ pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- --nostri ngval-- --nostringval-- false 1 %stopped_push Dictionary stack: --dict:1155/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75 /200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:18/25(L)- - Current allocation mode is local GPL Ghostscript 8.71: Unrecoverable error, exit code 1
Created attachment 5972 [details] h.pdf The attached file is protected by the password "a". I can open it with Adobe Reader or with SumatraPDF, but not with Ghostscript.
See bundled documentation (doc/Use.htm), the correct usage is: gs -sPDFPassword=a h.pdf The error message states the problem correctly, and the option is documented; acrobat reader shows a popup box asking for the password. gs's typical non-interactive usage never create pop-up's, so gs is working as intended. If the reporter feels the documentation is inadequate and/or the error message can be more informative, feel free to open another bug against documentation or the error message.