I am encrypting the pdf in rails using pdf-toolkit
here is my code: PDF::Toolkit.pdftk(infile output outfile user_pw rails)
It is giving error saying that undefined method user_pw
Any suggestions
I am encrypting the pdf in rails using pdf-toolkit
here is my code: PDF::Toolkit.pdftk(infile output outfile user_pw rails)
It is giving error saying that undefined method user_pw
Any suggestions
Have you provided that method or variable? If not then what do you think that user_pw is referring to?
Colin
I think that is predefined in pdftk
Please quote the previous message and put your reply inline at appropriate points. Remember this is a mailing list not a forum (though you may be accessing it via a forum-like interface. Thanks.
I think that is predefined in pdftk
Can you point me to the docs that make you think that in
PDF::Toolkit.pdftk(infile output outfile user_pw rails)
that user_pw is predefined in pdftk?
Colin
Colin Law wrote in post #1087900:
Colin Law wrote in post #1087900:
Please quote the previous message and put your reply inline at appropriate points. Remember this is a mailing list not a forum (though you may be accessing it via a forum-like interface. Thanks.
I think that is predefined in pdftk
Can you point me to the docs that make you think that in
PDF::Toolkit.pdftk(infile output outfile user_pw rails)
that user_pw is predefined in pdftk?
Colin
As you have coded it ruby will look for a variable or method called user_pw from which to get the value to pass to pdftk. If you want to pass the string user_pw then I guess that you must put "user_pw".
Colin
That is the usage summary for the command line tools, not for the ruby api. For starters you'll need to separate your arguments with commas, not spaces
Fred
It is working pdf is encrypted
my_pdf = PDF::Toolkit.open(directory+@encrypt_pdf.attach.url.split('?')[0].to_s) my_pdf.user_password=@encrypt_pdf.user_password my_pdf.owner_password=@encrypt_pdf.owner_password
how to allow permissions like printing screen reader