PDFEncryptor Class Reference

List of all members.

Public Member Functions

 PDFEncryptor ($in_pdfFile)
 setPdfFile ($in_value)
 setJavaPath ($in_value)
 setITextPath ($in_value)
 setEncryptPdfPath ($in_value)
 setAllowPrinting ($in_value)
 setAllowModifyContents ($in_value)
 setAllowCopy ($in_value)
 setAllowModifyAnnotations ($in_value)
 setAllowScreenReaders ($in_value)
 setAllowAssembly ($in_value)
 setAllowFillIn ($in_value)
 setAllowDegradedPrinting ($in_value)
 setEncryptionStrength ($in_value)
 setUserPassword ($in_value)
 setOwnerPassword ($in_value)
 setSubject ($in_value)
 setTitle ($in_value)
 setAuthor ($in_value)
 setCreator ($in_value)
 setKeywords ($in_value)
 setTmpDir ($in_path)
 encrypt ()
 _boolToInt ($in_bool)
 _getProperty ($in_key, $in_value)

Public Attributes

 $pdfFile = ''
 $tmpDir = '/tmp'
 $javaPath = '/usr/bin/java'
 $iTextPath
 $encryptPdfPath
 $allowPrinting = false
 $allowModifyContents = false
 $allowCopy = false
 $allowModifyAnnotations = false
 $allowScreenReaders = false
 $allowAssembly = false
 $allowFillIn = false
 $allowDegradedPrinting = false
 $encryptionStrength = 128
 $userPassword = ''
 $ownerPassword = ''
 $subject
 $title
 $author
 $creator = 'PDFEncryptor'
 $keywords

Detailed Description

Definition at line 39 of file PDFEncryptor.php.


Constructor & Destructor Documentation

PDFEncryptor::PDFEncryptor in_pdfFile  ) 
 

Initializes the class

Parameters:
string $in_pdfFile (optional) The full path to the pdf file to encrypt.
public
Returns:
void

Definition at line 179 of file PDFEncryptor.php.


Member Function Documentation

PDFEncryptor::_boolToInt in_bool  ) 
 

Converts a boolean to an integer

Parameters:
bool $in_bool The boolean
private
Returns:
int The integer

Definition at line 600 of file PDFEncryptor.php.

Referenced by encrypt().

PDFEncryptor::_getProperty in_key,
in_value
 

Gets a property if it has been set

Parameters:
string $in_key The key property
string $in_value The value of the key
public
Returns:
string The key value pair

Definition at line 617 of file PDFEncryptor.php.

Referenced by encrypt().

PDFEncryptor::encrypt  ) 
 

Encrypt the PDF file, add meta-data, and set permissions

public

Returns:
mixed True on success, pear error on problem

Definition at line 535 of file PDFEncryptor.php.

References _boolToInt(), and _getProperty().

PDFEncryptor::setAllowAssembly in_value  ) 
 

Set should we allow assembly?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 341 of file PDFEncryptor.php.

PDFEncryptor::setAllowCopy in_value  ) 
 

Set should we allow the copy command?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 293 of file PDFEncryptor.php.

PDFEncryptor::setAllowDegradedPrinting in_value  ) 
 

Set should we allow degraded printing?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 373 of file PDFEncryptor.php.

PDFEncryptor::setAllowFillIn in_value  ) 
 

Set should we fill in?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 357 of file PDFEncryptor.php.

PDFEncryptor::setAllowModifyAnnotations in_value  ) 
 

Set should we allow modify annotations?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 309 of file PDFEncryptor.php.

PDFEncryptor::setAllowModifyContents in_value  ) 
 

Set should we allow the contents to be modified?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 277 of file PDFEncryptor.php.

PDFEncryptor::setAllowPrinting in_value  ) 
 

Set should we allow printing?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 261 of file PDFEncryptor.php.

PDFEncryptor::setAllowScreenReaders in_value  ) 
 

Set should we allow screen readers?

Parameters:
bool $in_value The value
public
Returns:
void

Definition at line 325 of file PDFEncryptor.php.

PDFEncryptor::setAuthor in_value  ) 
 

Set the author (meta-data)

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 474 of file PDFEncryptor.php.

PDFEncryptor::setCreator in_value  ) 
 

Set the creator (meta-data)

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 490 of file PDFEncryptor.php.

PDFEncryptor::setEncryptionStrength in_value  ) 
 

Set the encryption strength (128 or 40)

Parameters:
int $in_value The value
public
Returns:
void

Definition at line 389 of file PDFEncryptor.php.

PDFEncryptor::setEncryptPdfPath in_value  ) 
 

Set the path to the encrypt_pdf java class

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 245 of file PDFEncryptor.php.

PDFEncryptor::setITextPath in_value  ) 
 

Set the path to the iText jar file

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 229 of file PDFEncryptor.php.

PDFEncryptor::setJavaPath in_value  ) 
 

Set the path to the java binary

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 213 of file PDFEncryptor.php.

PDFEncryptor::setKeywords in_value  ) 
 

Set the keywords (meta-data)

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 506 of file PDFEncryptor.php.

PDFEncryptor::setOwnerPassword in_value  ) 
 

Set the owner password

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 426 of file PDFEncryptor.php.

PDFEncryptor::setPdfFile in_value  ) 
 

Set the full path to the PDF we are encrypting

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 197 of file PDFEncryptor.php.

PDFEncryptor::setSubject in_value  ) 
 

Set the subject (meta-data)

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 442 of file PDFEncryptor.php.

PDFEncryptor::setTitle in_value  ) 
 

Set the title (meta-data)

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 458 of file PDFEncryptor.php.

PDFEncryptor::setTmpDir in_path  ) 
 

Set the temporary directory path

Parameters:
string $in_path The full path to the tmp dir
public
Returns:
void

Definition at line 522 of file PDFEncryptor.php.

PDFEncryptor::setUserPassword in_value  ) 
 

Set the user password

Parameters:
string $in_value The value
public
Returns:
void

Definition at line 410 of file PDFEncryptor.php.


Member Data Documentation

PDFEncryptor::$allowAssembly = false
 

Definition at line 106 of file PDFEncryptor.php.

PDFEncryptor::$allowCopy = false
 

Definition at line 88 of file PDFEncryptor.php.

PDFEncryptor::$allowDegradedPrinting = false
 

Definition at line 118 of file PDFEncryptor.php.

PDFEncryptor::$allowFillIn = false
 

Definition at line 112 of file PDFEncryptor.php.

PDFEncryptor::$allowModifyAnnotations = false
 

Definition at line 94 of file PDFEncryptor.php.

PDFEncryptor::$allowModifyContents = false
 

Definition at line 82 of file PDFEncryptor.php.

PDFEncryptor::$allowPrinting = false
 

Definition at line 76 of file PDFEncryptor.php.

PDFEncryptor::$allowScreenReaders = false
 

Definition at line 100 of file PDFEncryptor.php.

PDFEncryptor::$author
 

Definition at line 154 of file PDFEncryptor.php.

PDFEncryptor::$creator = 'PDFEncryptor'
 

Definition at line 160 of file PDFEncryptor.php.

PDFEncryptor::$encryptionStrength = 128
 

Definition at line 124 of file PDFEncryptor.php.

PDFEncryptor::$encryptPdfPath
 

Definition at line 70 of file PDFEncryptor.php.

PDFEncryptor::$iTextPath
 

Definition at line 64 of file PDFEncryptor.php.

PDFEncryptor::$javaPath = '/usr/bin/java'
 

Definition at line 58 of file PDFEncryptor.php.

PDFEncryptor::$keywords
 

Definition at line 166 of file PDFEncryptor.php.

PDFEncryptor::$ownerPassword = ''
 

Definition at line 136 of file PDFEncryptor.php.

PDFEncryptor::$pdfFile = ''
 

Definition at line 46 of file PDFEncryptor.php.

PDFEncryptor::$subject
 

Definition at line 142 of file PDFEncryptor.php.

PDFEncryptor::$title
 

Definition at line 148 of file PDFEncryptor.php.

PDFEncryptor::$tmpDir = '/tmp'
 

Definition at line 52 of file PDFEncryptor.php.

PDFEncryptor::$userPassword = ''
 

Definition at line 130 of file PDFEncryptor.php.


The documentation for this class was generated from the following file:
Generated on Sat Feb 11 08:43:11 2006 for HTML_ToPDF by  doxygen 1.4.3-20050530