in reply to pdftk encryption function

The PDF::Tk documentation clearly states that the call_pdftk method "Calls up pdftk command, takes input, output and pdftk operation as arguments input and output can either be files or scalar refs. input can also be an array ref of files". I don't see any indication that it will take anything other than three arguments.

When I look at the PDFTk site, I can see that they have a product called PDFtk Server that gives you command-line capabilities. On their examples page, it even shows example command lines for encrypting and decrypting PDFs. So perhaps you might try PDFtk Server and use perl's system function (perldoc -f system) to call it under program control.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: pdftk encryption function
by sumalatha (Novice) on Sep 18, 2014 at 12:10 UTC

    pdftk server (pdftk binary file) for linux has been already installed and passing the executable binary file value in 2nd line of source code.

    Please let me how to resolve it.

      sumalatha:

      Please read my post again--I told you how you may resolve it.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

        Thanks for providing the PDF::Tk link and read throughout and went across Tk.pm module also. when tried for split pdf file function by passing arguments as "$doc->call_pdftk('input.pdf', 'out.pdf', 'cat', '1-14');", then the function is working fine, by retrieving pages from 1 to 14 to output pdf file.

        but i'am not able to perform encryption function, please help me and sorry for repeatedly asking