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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 5 December 2012 10:40, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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_pwHave you provided that method or variable? If not then what do you think that user_pw is referring to? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I think that is predefined in pdftk -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 5 December 2012 11:04, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: 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 pdftkCan 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1087900:> On 5 December 2012 11:04, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > 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? > > Colinhttp://www.pdflabs.com/docs/pdftk-cli-examples/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 5 December 2012 11:14, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1087900: >> On 5 December 2012 11:04, kiran cy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >> 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 > > http://www.pdflabs.com/docs/pdftk-cli-examples/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> > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Dec 5, 11:14 am, kiran cy <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> > http://www.pdflabs.com/docs/pdftk-cli-examples/ >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> -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.