Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Remove PDF password?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
ralle
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 144
Location: Aachen, Germany

PostPosted: Mon Jan 26, 2004 1:21 pm    Post subject: Remove PDF password? Reply with quote

Hi!

I'm looking for a way to unlock password protected pdf files. To make it clear, I DO KNOW the password!
It's just getting on my nerves that I have to open the files in Acrobat Reader or xPDF instead of just typing "lpr *.pdf".
As I really have to print a whole bunch of PDFs, someone who can help would really save me some time...
--
Ralph
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Mon Jan 26, 2004 2:29 pm    Post subject: Reply with quote

under winblows you can open them in Acrobat (NOT reader) and change the settings... i don't know about it in Linux
Back to top
View user's profile Send private message
ralle
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 144
Location: Aachen, Germany

PostPosted: Mon Jan 26, 2004 3:42 pm    Post subject: Reply with quote

That's not the point I'm up to...
I can get password free PDFs under Linux by printing them as Postscript from Acrobat Reader and then converting them to pdf again.
But I have to print more than 100 PDFs, most of them protected but with the same password.
I'm looking for a way to batch-remove the password, so that I don't have to print every single file from Acrobat Reader.
It's much simpler to batch-remove the password and then just "lpr *.pdf", but I don't know a tool that helps me to get rid of the password...
Back to top
View user's profile Send private message
Boba
n00b
n00b


Joined: 10 Sep 2002
Posts: 38

PostPosted: Mon Jan 26, 2004 4:32 pm    Post subject: Reply with quote

If you want to remove the printing restrictions try Multivalent Tools, works fine for me:
http://www.cs.berkeley.edu/~phelps/Multivalent/Tools/pdf/Decrypt.html
_________________
LinuxSoftBoard.de
Back to top
View user's profile Send private message
ralle
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 144
Location: Aachen, Germany

PostPosted: Mon Jan 26, 2004 5:19 pm    Post subject: Reply with quote

That thing looks like it can fulfill my needs...except that I don't have it working yet.

Code:

ralph@fry multivalent $ java -classpath ./Multivalent.jar tool.pdf.Decrypt -help
java tool.pdf.Decrypt [-password <owner-password>] [-inplace] <PDF-file...>

So Multivalent seems to work on my system.

Code:

ralph@fry multivalent $ java -classpath ./Multivalent.jar tool.pdf.Decrypt -password Sharpe64 pdftest/IF_2004-01-20_Begleitunterlagen.pdf
pdftest/IF_2004-01-20_Begleitunterlagen.pdf: owner password required
owner password required
        at tool.pdf.Decrypt.decrypt(Decrypt.java:71)
        at tool.pdf.Decrypt.decrypt(Decrypt.java:52)
        at tool.pdf.Decrypt.main(Decrypt.java:125)
ralph@fry multivalent $


But it doesn't decrypt the PDF File although I DO give the password.
The password is definately right, at least it works when I want to read the file in Acrobat Reader or xPDF.

Can you help me with that?
Back to top
View user's profile Send private message
ralle
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 144
Location: Aachen, Germany

PostPosted: Mon Jan 26, 2004 6:07 pm    Post subject: Reply with quote

The password I got is only the user password, not the owner password. I didn't know there were such differences.
Anyway I decided to go the "PDF encrypted -> PS -> PDF unencrypted" way.
So I try to convert an encrypted PDF to PS using acroread on the commandline. Still no luck...
Code:

ralph@fry multivalent $ acroread -toPostScript IF_2004-01-20_Begleitunterlagen.pdf
IF_2004-01-20_Begleitunterlagen.pdf: This document requires a password.

I can't find an option to pass the password to acroread on the commandline, now looking for different programs...
Back to top
View user's profile Send private message
EliasP
Guru
Guru


Joined: 06 Dec 2002
Posts: 318
Location: South-West Germany

PostPosted: Thu Feb 12, 2004 6:19 pm    Post subject: Reply with quote

Similiar problem here.
I'm working on an easy-to-use Desktop, based on KDE3.2 for my girlfriend, but don't want to use acroread.
Kghostview/KPDF doesn't support password protected files, so I'm trying to write a little script which encrypts PDFs before opening them, but PDF-Encrypt doesn't work as it should do. ;(

Code:

anna@emilie Multivalent-Tools $ java -classpath /home/anna/Programmdaten/Programme/Multivalent-Tools/Multivalent.jar tool.pdf.Decrypt /home/anna/Desktop/pdf/Allgemeine\ Hinweise.pdf
/home/anna/Desktop/pdf/Allgemeine Hinweise.pdf: java.io.IOException: decrypt first!
java.io.IOException: decrypt first!
        at multivalent.std.adaptor.pdf.PDFReader.getCatalog(PDFReader.java:990)
        at multivalent.std.adaptor.pdf.PDFWriter.<init>(PDFWriter.java:231)
        at multivalent.std.adaptor.pdf.PDFWriter.<init>(PDFWriter.java:207)
        at multivalent.std.adaptor.pdf.PDFWriter.<init>(PDFWriter.java:200)
        at tool.pdf.Decrypt.decrypt(Decrypt.java:66)
        at tool.pdf.Decrypt.decrypt(Decrypt.java:55)
        at tool.pdf.Decrypt.main(Decrypt.java:136)


Does anybody know a solution?

Thx & Greetings

Elias P.
Back to top
View user's profile Send private message
ralle
Tux's lil' helper
Tux's lil' helper


Joined: 25 Mar 2003
Posts: 144
Location: Aachen, Germany

PostPosted: Fri Feb 13, 2004 1:13 am    Post subject: Reply with quote

Since I'm not the only one with that problem, I put myself again at it...after hours of searching, finally a success:

Code:

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=bla.pdf -sPDFPassword=Sharpe64 -f IF_2004-01-20_Begleitunterlagen.pdf


works for me!
Man I'm angry! It took my hours to find out that the working option for the user password is not -sUserPassword but -sPDFPassword !!!
Completely misleading, the gs manpage sucks more than anything else!

I'm too tired now to make a script and gotta learn for an exam...
If you don't want to make a script I'll do it on Monday or Tuesday next week, but you better PM me so that I don't forget...

So long and good night, hope I could help you a little...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum