GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CAM::PDF::Decrypt(3) User Contributed Perl Documentation CAM::PDF::Decrypt(3)

CAM::PDF::Decrypt - PDF security helper

See CAM::PDF.

    use CAM::PDF;
    my $pdf = CAM::PDF->new($filename);

This class is used invisibly by CAM::PDF whenever it detects that a document is encrypted. See new(), getPrefs() and setPrefs() in that module.

$pkg->new($pdf, $ownerpass, $userpass, $prompt)
Create and validate a new decryption object. If this fails, it will set $CAM::PDF::errstr and return undef.

$prompt is a boolean that says whether the user should be prompted for a password on the command line.

$self->decode_permissions($field)
Given a binary encoded permissions string from a PDF document, return the four individual boolean fields as an array:

  print boolean
  modify boolean
  copy boolean
  add boolean
    
$self->encode_permissions($print, $modify, $copy, $add)
Given four booleans, pack them into a single field in the PDF style that decode_permissions can understand. Returns that scalar.
$self->set_passwords($doc, $ownerpass, $userpass)
$self->set_passwords($doc, $ownerpass, $userpass, $permissions)
Change the PDF passwords to the specified values. When the PDF is output, it will be encrypted with the new passwords.

PERMISSIONS is an optional scalar of the form that decode_permissions can understand. If not specified, the existing values will be retained.

Note: we only support writing using encryption version 1, even though we can read encryption version 2 as well.

$self->encrypt($doc, $string)
Encrypt the scalar using the passwords previously specified.
$self->decrypt($doc, $string)
Decrypt the scalar using the passwords previously specified.

See CAM::PDF
2013-08-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.