jet.bean
Class PDFParameter

java.lang.Object
  extended by jet.bean.PDFParameter
All Implemented Interfaces:
java.io.Serializable

public class PDFParameter
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int AllowAll
          The operation permitted when the document is opened with the user password
static int AllowAnyExceptExtract
          The operation permitted when the document is opened with the user password
static int AllowCommentFillIn
          The operation permitted when the document is opened with the user password
static int AllowCopy
          The operation permitted when the document is opened with the user password
static int AllowFillInSign
          The operation permitted when the document is opened with the user password
static int AllowHighResPrint
          The operation permitted when the document is opened with the user password
static int AllowInsertDeleteRotate
          The operation permitted when the document is opened with the user password
static int AllowLayoutFillInSign
          The operation permitted when the document is opened with the user password
static int AllowLowResPrint
          The operation permitted when the document is opened with the user password
static int AllowNone
          The operation permitted when the document is opened with the user password
static int AllowScreenReaders
          The operation permitted when the document is opened with the user password
static int SELF_SIGNED
          The self signed method.
static boolean STRENGTH128BITS
          Type of encryption
static boolean STRENGTH40BITS
          Type of encryption
static int VERISIGN_SIGNED
          The VeriSign method.
static int WINCER_SIGNED
          The Windows Certificate Security method.
 
Constructor Summary
PDFParameter()
          constructor
 
Method Summary
 PDFParameter copy()
          add this method for MailInformation can clone this object
 java.lang.String getDigitalIDFilePassword()
          Gets the password of the digital ID file.
 java.io.InputStream getDigitalIDFileStream()
          Gets the digital ID file path.
 int[][] getExportPageRange()
          Gets the export page range.
 int[] getExportPages()
          Gets the export page numbers.
 int getImageCompressRatio()
          Gets the image compress ratio of the pdf file.
 int getMaxPageOfOneFile()
          Gets the max size of one PDF file.
 int getMaxSizeOfOneFile()
          Gets the max size of one PDF file.
 java.lang.String getOwnerPassword()
          Gets the owner password of the pdf document.
 int getPermissions()
          Gets the permissions of pdf document.
 int getSignatureMethod()
          Gets the signature method for the document, it can be SELF_SIGNED, WINCER_SIGNED and VERISIGN_SIGNED.
 java.lang.String getSigningContact()
          Gets the signing contact.
 java.lang.String getSigningLocation()
          Gets the signing location.
 java.lang.String getSigningReason()
          Gets the signing reason.
 java.lang.String getUserPassword()
          Gets the user password of the pdf document.
 boolean hasDrill()
          Gets the pdf file with Drill Down.
 boolean hasEncryption()
           
 boolean hasSignature()
           
 boolean hasToc()
          Gets the pdf file with TOC.
 boolean isSimPrintMode()
          Gets the pdf print mode when generate charts and barcodes.
 boolean isStrength128Bits()
          Gets if the pdf document Encryption level is High(128-bit RC4) or Low(40-bit RC4).
 boolean isTransparent()
          Deprecated. this is replaced by the method setImageCompressRatio(int imageCompressRatio)
 boolean noMargin()
          Gets the document has margin or not
 void setDigitalSignature(int signatureMethod, byte[] digitalIDValues, java.lang.String digitalIDFilePassword)
          Sets the digital signature options for this document.
 void setDigitalSignature(int signatureMethod, java.io.InputStream digitalIDFileStream, java.lang.String digitalIDFilePassword)
          Sets the digital signature options for this document.
 void setDigitalSignature(int signatureMethod, java.lang.String digitalIDFilePath, java.lang.String digitalIDFilePassword)
          Sets the digital signature options for this document.
 void setDrill(boolean hasDrill)
          Sets the pdf file with Drill Down
 void setEncryption(boolean strength128Bits, java.lang.String userPassword, java.lang.String ownerPassword, int permissions)
          Sets the encryption options for this document.
 void setExportPageRange(int[][] pageRange)
          Sets the export page range.
 void setExportPages(int[] pages)
          Sets the export page numbers.
 void setImageCompressRatio(int imageCompressRatio)
          Sets the image compression ratio of the pdf file, if not compress image, the value will be -1.
 void setIsSimPrintMode(boolean isSimPrintMode)
          Sets pdf print mode when generate charts and barcodes.
 void setMaxPageOfOneFile(int maxPageOfOneFile)
          Sets the max size of one PDF File, maxSizeOfOneFile == -1, if not specify file size.
 void setMaxSizeOfOneFile(int maxSizeOfOneFile)
          Sets the max size of one PDF File, maxSizeOfOneFile == -1, if not specify file size.
 void setNoMargin(boolean noMargin)
          Sets the pdf file without page margin.
 void setPassword(java.lang.String password)
           
 void setSigningContact(java.lang.String contact)
          Sets the signing contact.
 void setSigningLocation(java.lang.String location)
          Sets the signing location.
 void setSigningReason(java.lang.String reason)
          Sets the signing reason.
 void setToc(boolean hasToc)
          Sets the pdf file with TOC.
 void setTransparent(boolean transparent)
          Deprecated. this is replaced by the method setImageCompressRatio(int imageCompressRatio)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AllowNone

public static final int AllowNone
The operation permitted when the document is opened with the user password

See Also:
Constant Field Values

AllowLowResPrint

public static final int AllowLowResPrint
The operation permitted when the document is opened with the user password


AllowHighResPrint

public static final int AllowHighResPrint
The operation permitted when the document is opened with the user password


AllowInsertDeleteRotate

public static final int AllowInsertDeleteRotate
The operation permitted when the document is opened with the user password


AllowFillInSign

public static final int AllowFillInSign
The operation permitted when the document is opened with the user password


AllowCommentFillIn

public static final int AllowCommentFillIn
The operation permitted when the document is opened with the user password


AllowAnyExceptExtract

public static final int AllowAnyExceptExtract
The operation permitted when the document is opened with the user password


AllowCopy

public static final int AllowCopy
The operation permitted when the document is opened with the user password


AllowScreenReaders

public static final int AllowScreenReaders
The operation permitted when the document is opened with the user password


AllowLayoutFillInSign

public static final int AllowLayoutFillInSign
The operation permitted when the document is opened with the user password


AllowAll

public static final int AllowAll
The operation permitted when the document is opened with the user password


STRENGTH40BITS

public static final boolean STRENGTH40BITS
Type of encryption

See Also:
Constant Field Values

STRENGTH128BITS

public static final boolean STRENGTH128BITS
Type of encryption

See Also:
Constant Field Values

SELF_SIGNED

public static final int SELF_SIGNED
The self signed method.

See Also:
Constant Field Values

VERISIGN_SIGNED

public static final int VERISIGN_SIGNED
The VeriSign method.

See Also:
Constant Field Values

WINCER_SIGNED

public static final int WINCER_SIGNED
The Windows Certificate Security method.

See Also:
Constant Field Values
Constructor Detail

PDFParameter

public PDFParameter()
constructor

Method Detail

setNoMargin

public void setNoMargin(boolean noMargin)
Sets the pdf file without page margin.

Parameters:
noMargin - indicates to generate the pdf file without page margin

setIsSimPrintMode

public void setIsSimPrintMode(boolean isSimPrintMode)
Sets pdf print mode when generate charts and barcodes.

Parameters:
isSimPrintMode - if the value is true, then indicates to generate the charts and barcodes using Vector graphics, else generate charts and barcodes using images(recommended)

setImageCompressRatio

public void setImageCompressRatio(int imageCompressRatio)
Sets the image compression ratio of the pdf file, if not compress image, the value will be -1.

Parameters:
imageCompressRatio - indicatess to generate the pdf file compress image

setToc

public void setToc(boolean hasToc)
Sets the pdf file with TOC.

Parameters:
hasToc - indicates to generate the pdf file with TOC

setDrill

public void setDrill(boolean hasDrill)
Sets the pdf file with Drill Down

Parameters:
hasDrill - indicates to generate the pdf file with Drill Down

setExportPages

public void setExportPages(int[] pages)
Sets the export page numbers.

Parameters:
pages - the export page numbers

setExportPageRange

public void setExportPageRange(int[][] pageRange)
Sets the export page range.

Parameters:
pageRange - the export page range

noMargin

public boolean noMargin()
Gets the document has margin or not

Returns:
the document has margin or not

isSimPrintMode

public boolean isSimPrintMode()
Gets the pdf print mode when generate charts and barcodes.

Returns:
the pdf print mode, if the value is true, then indicates to generate the charts and barcodes using Vector graphics, else generate charts and barcodes using images(recommended)

getImageCompressRatio

public int getImageCompressRatio()
Gets the image compress ratio of the pdf file.

Returns:
the image compress ratio of the pdf file

hasToc

public boolean hasToc()
Gets the pdf file with TOC.

Returns:
the pdf file with TOC

hasDrill

public boolean hasDrill()
Gets the pdf file with Drill Down.

Returns:
the pdf file with Drill Down

getExportPages

public int[] getExportPages()
Gets the export page numbers.

Returns:
the export page number

getExportPageRange

public int[][] getExportPageRange()
Gets the export page range.

Returns:
the export page range

setMaxSizeOfOneFile

public void setMaxSizeOfOneFile(int maxSizeOfOneFile)
Sets the max size of one PDF File, maxSizeOfOneFile == -1, if not specify file size. This size is KB.

Parameters:
maxSizeOfOnePage -

getMaxSizeOfOneFile

public int getMaxSizeOfOneFile()
Gets the max size of one PDF file.

Returns:
the max size of one file

setMaxPageOfOneFile

public void setMaxPageOfOneFile(int maxPageOfOneFile)
Sets the max size of one PDF File, maxSizeOfOneFile == -1, if not specify file size. This size is KB.

Parameters:
maxSizeOfOnePage -

getMaxPageOfOneFile

public int getMaxPageOfOneFile()
Gets the max size of one PDF file.

Returns:
the max size of one file

setPassword

public void setPassword(java.lang.String password)

setEncryption

public void setEncryption(boolean strength128Bits,
                          java.lang.String userPassword,
                          java.lang.String ownerPassword,
                          int permissions)
Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowLowResPrint, AllowHighResPrint, AllowInsertDeleteRotate, AllowFillInSign, AllowCommentFillIn, AllowAnyExceptExtract, AllowCopy and AllowScreenReaders. The permissions can be combined by ORing them.

Parameters:
strength128Bits - true for 128 bit key length, false for 40 bit key length
userPassword - the user password. Can be null or empty
ownerPassword - the owner password. Can be null or empty
permissions - the user permissions

setDigitalSignature

public void setDigitalSignature(int signatureMethod,
                                java.io.InputStream digitalIDFileStream,
                                java.lang.String digitalIDFilePassword)
Sets the digital signature options for this document. The digitalIDFilePassword can not be null or have zero length. The signature methods for the document can be SELF_SIGNED, WINCER_SIGNED and VERISIGN_SIGNED

Parameters:
signatureMethod - the digital signature method
digitalIDFileStream - the stream of the digital id file
digitalIDFilePassword - the Digital ID file password

setDigitalSignature

public void setDigitalSignature(int signatureMethod,
                                byte[] digitalIDValues,
                                java.lang.String digitalIDFilePassword)
Sets the digital signature options for this document. The digitalIDFilePassword can not be null or have zero length. The signature methods for the document can be SELF_SIGNED, WINCER_SIGNED and VERISIGN_SIGNED

Parameters:
signatureMethod - the digital signature method
digitalIDValues - the contents of the digital id file
digitalIDFilePassword - the Digital ID file password

setDigitalSignature

public void setDigitalSignature(int signatureMethod,
                                java.lang.String digitalIDFilePath,
                                java.lang.String digitalIDFilePassword)
Sets the digital signature options for this document. The digitalIDFilePassword can not be null or have zero length. The signature methods for the document can be SELF_SIGNED, WINCER_SIGNED and VERISIGN_SIGNED

Parameters:
signatureMethod - the digital signature method
digitalIDFilePath - the Digital ID file path
digitalIDFilePassword - the Digital ID file password

hasSignature

public boolean hasSignature()
Returns:
the document has signature or not

hasEncryption

public boolean hasEncryption()
Returns:
the document has encryption or not

setSigningReason

public void setSigningReason(java.lang.String reason)
Sets the signing reason.

Parameters:
reason - the signing reason

setSigningLocation

public void setSigningLocation(java.lang.String location)
Sets the signing location.

Parameters:
location - the signing location

setSigningContact

public void setSigningContact(java.lang.String contact)
Sets the signing contact.

Parameters:
contact - the signing contact

isStrength128Bits

public boolean isStrength128Bits()
Gets if the pdf document Encryption level is High(128-bit RC4) or Low(40-bit RC4).

Returns:
pdf document Encryption level

getUserPassword

public java.lang.String getUserPassword()
Gets the user password of the pdf document.

Returns:
user password

getOwnerPassword

public java.lang.String getOwnerPassword()
Gets the owner password of the pdf document.

Returns:
owner password

getPermissions

public int getPermissions()
Gets the permissions of pdf document.

Returns:
permissions

getSignatureMethod

public int getSignatureMethod()
Gets the signature method for the document, it can be SELF_SIGNED, WINCER_SIGNED and VERISIGN_SIGNED.

Returns:
the signature method

getDigitalIDFileStream

public java.io.InputStream getDigitalIDFileStream()
Gets the digital ID file path.

Returns:
the digital ID file path

getDigitalIDFilePassword

public java.lang.String getDigitalIDFilePassword()
Gets the password of the digital ID file.

Returns:
the password of the digital ID file

getSigningReason

public java.lang.String getSigningReason()
Gets the signing reason.

Returns:
the signing reason

getSigningLocation

public java.lang.String getSigningLocation()
Gets the signing location.

Returns:
the signing location

getSigningContact

public java.lang.String getSigningContact()
Gets the signing contact.

Returns:
the signing contact

isTransparent

public boolean isTransparent()
Deprecated. this is replaced by the method setImageCompressRatio(int imageCompressRatio)

Gets the tag of transparent

Returns:

setTransparent

public void setTransparent(boolean transparent)
Deprecated. this is replaced by the method setImageCompressRatio(int imageCompressRatio)

Sets the image is transparent

Parameters:
transparent -

copy

public PDFParameter copy()
add this method for MailInformation can clone this object

Returns: