org.apache.fop.pdf
Class PDFEncryption

java.lang.Object
  |
  +--org.apache.fop.pdf.PDFObject
        |
        +--org.apache.fop.pdf.PDFEncryption

public class PDFEncryption
extends PDFObject

class representing a /Filter /Standard object.


Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFEncryption(int number)
          create a /Filter /Standard object.
 
Method Summary
static boolean encryptionAvailable()
           
 java.lang.String getFileID(int index)
          This method returns the indexed file ID
 void init()
          This method initializes the encryption algorithms and values
 PDFFilter makeFilter(int number, int generation)
          Creates PDFFilter for the encryption object
 void setAllowCopyContent(boolean value)
          Set whether the document will allow the content to be extracted
 void setAllowEditAnnotation(boolean value)
          Set whether the document will allow annotation modificcations
 void setAllowEditContent(boolean value)
          Set whether the document will allow content editting
 void setAllowPrint(boolean value)
          Set whether the document will allow printing.
 void setOwnerPassword(java.lang.String value)
          Sets the owner password for the PDF
 void setUserPassword(java.lang.String value)
          This method allows the setting of the user password
 byte[] toPDF()
          represent the object in PDF
 
Methods inherited from class org.apache.fop.pdf.PDFObject
getNumber, output, referencePDF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFEncryption

public PDFEncryption(int number)
create a /Filter /Standard object.
Parameters:
number - the object's number
Method Detail

setUserPassword

public void setUserPassword(java.lang.String value)
This method allows the setting of the user password
Parameters:
value - The string to use as the user password. It may be blank but not null.

setOwnerPassword

public void setOwnerPassword(java.lang.String value)
Sets the owner password for the PDF
Parameters:
value - The owner password

setAllowPrint

public void setAllowPrint(boolean value)
Set whether the document will allow printing.
Parameters:
value - The new permision value

setAllowCopyContent

public void setAllowCopyContent(boolean value)
Set whether the document will allow the content to be extracted
Parameters:
value - The new permission value

setAllowEditContent

public void setAllowEditContent(boolean value)
Set whether the document will allow content editting
Parameters:
value - The new permission value

setAllowEditAnnotation

public void setAllowEditAnnotation(boolean value)
Set whether the document will allow annotation modificcations
Parameters:
value - The new permission value

getFileID

public java.lang.String getFileID(int index)
This method returns the indexed file ID
Parameters:
index - The index to access the file ID
Returns:
The file ID

init

public void init()
This method initializes the encryption algorithms and values

makeFilter

public PDFFilter makeFilter(int number,
                            int generation)
Creates PDFFilter for the encryption object
Parameters:
number - The object number
generation - The objects generation
Returns:
The resulting filter

toPDF

public byte[] toPDF()
             throws java.lang.IllegalStateException
represent the object in PDF
Returns:
the PDF

encryptionAvailable

public static boolean encryptionAvailable()


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.