|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.crionics.jpdf.Preferences
public final class Preferences
This class can be used to custumoze the PDF generation attributes.
| Field Summary | |
|---|---|
static int |
ENCRYPTION_AES
AES-128 Encryption, only supported by PDF 1.6 (Acrobat 7) |
static int |
ENCRYPTION_NONE
No Encryption setting |
static int |
ENCRYPTION_RC4
RC4 Encryption |
static int |
FORMAT_G3CCITT
|
static int |
FORMAT_G4CCITT
|
static int |
FORMAT_GZIP
|
static int |
FORMAT_JPEG
|
static int |
FORMAT_RAW
|
static int |
FORMAT_UNCHANGED
|
ICredentials |
openCredentials
|
RenderingParameters |
params
|
static int |
PDFFORMAT_COMPATIBLE
The standard legacy format. |
static int |
PDFFORMAT_PURE
Starting with Acrobat 6, Adobe introduced a new format aimed at compressing the document size further. |
static int |
SECURITY_CERTIFICATE_PROTECTED
|
static int |
SECURITY_NONE
|
static int |
SECURITY_PASSWORD_PROTECTED
|
static int |
SIGN_COMPATIBLE
Comaptible signature are generated with a pkcs7.detached filter This format is compatible with Verisign |
static int |
SIGN_LEGACY
Raw signature format are generated with a x509.xxxxx filter |
static int |
SIGN_WINDOWS
Windows signature are generated with a pkcs7.sha1 filter |
| Constructor Summary | |
|---|---|
Preferences()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
getBlackAndWhiteImageCompression()
Returns the compression algorithm used for Black and white graphics Typical values are: FORMAT_G3CCITT FORMAT_G4CCITT FORMAT_GZIP FORMAT_JPEG FORMAT_RAW FORMAT_UNCHANGED |
int |
getColorAndGrayscaleImageCompression()
Returns the compression algorithm used for color and gray graphics. |
ICredentialsCreation |
getDefaultCredentials()
|
int |
getDefaultEncryptionKeyLength()
returns the key length used to cipher the document. |
int |
getDefaultEncryptionType()
return the encryption type used to protect the document any of ENCRYPTION_NONE no encryption ENCRYPTION_RC4 standard encryption, 40 and 128 bits long. |
java.awt.print.PageFormat |
getDefaultPageFormat()
Returns the default page size in use when new pages are appended. |
int |
getDefaultPDFFormat()
return true if document is generated for Acrobat 6+ only |
float |
getDefaultPDFVersion()
Returns the default PDF Version for new documents or made out of an existing one. |
int |
getDefaultSecurityType()
Return how the document is protected. any of: SECURITY_NONE SECURITY_PASSWORD_PROTECTED SECURITY_CERTIFICATE_PROTECTED default:SECURITY_NONE This setting is used at document creation. |
int |
getDefaultSignatureType()
|
java.lang.String |
getJceProvider()
gets the JCE Name than in use internally. |
int |
getLoosyCompressionQuality()
Returns the compression quality for loosy image compressions |
boolean |
getShowAuthenticationGUI()
return true if a dialog is displayed to request the authorization credentials. |
int |
getTabSize()
Sets the number of Space character to use when drawing Text containing Tabulation characters. |
boolean |
isCompressed()
Returns true if the document is compressed |
boolean |
isDownSampleImages()
Images are typically smaller or bigger than showed on a pdf pages. |
boolean |
isGenerateAnnotations()
return true if jpdf renders the pdf annotations. |
boolean |
isGenerateStringsAsGlyph()
Forces jPDF to render strings as Glyphs, it makes documents bigger but forbids copy/paste as well as text ripping. |
boolean |
isUseObjectStreams()
This flag only makes sense if setPurePDF15 is true. it forces the engine to store objects in object streams. the default is TRUE. |
void |
setBlackAndWhiteImageCompression(int bwAlgorithm)
Select the compression algorithm for B&W pictures defaults to FORMAT_GZIP Typical values are: FORMAT_G3CCITT FORMAT_G4CCITT FORMAT_GZIP FORMAT_JPEG FORMAT_RAW FORMAT_UNCHANGED |
void |
setColorAndGrayscaleImageCompression(int colorAlgorithm)
Select the compression algorithm for color pictures defaults to FORMAT_GZIP Typical values are: FORMAT_GZIP FORMAT_JPEG FORMAT_RAW |
void |
setCompressed(boolean compress)
Should the output be compressed default is true; |
void |
setDefaultCredentials(ICredentialsCreation credentials)
|
void |
setDefaultEncryptionKeyLength(int theKeyLength)
Sets the key length used to cipher the document |
void |
setDefaultEncryptionType(int encryptionType)
This setting is used at document creation. |
void |
setDefaultPageFormat(java.awt.print.PageFormat pageSize)
Sets the default page size in use when new pages are created. |
void |
setDefaultPDFFormat(int format)
Forces the parser to generate documents using the new format introduced with Acrobat 6 (PDF 1.5). |
void |
setDefaultPDFVersion(float version)
Sets the default PDF Version for new documents.This property applies only when a new document is created. |
void |
setDefaultSecurityType(int securityType)
|
void |
setDefaultSignatureType(int signLevel)
The parameter controls what kind of PDF signature is built in the document. |
void |
setDownSampleImages(boolean downSample)
Should images be resized or down sampled. |
void |
setGenerateAnnotations(boolean isGenerateAnnotations)
jPDF renders annotations when this flag is set to true |
void |
setGenerateStringsAsGlyph(boolean thedrawStringsAsGlyph)
Tells jPDF Creator if it must create String as a caracter string or as a Glyph |
void |
setJceProvider(java.lang.String provider)
Sets the JCE Name than must be used internally. |
void |
setLoosyCompressionQuality(int theQuality)
Sets the quality used by loosy compression algorithms such as JPEG |
void |
setShowAuthenticationGUI(boolean showAuthenticationGUI)
Sets if jPDF should display a dialog to request authorization credentials. |
void |
setTabSize(int value)
Sets the number of Space character to use when drawing Text containing Tabulation characters. |
void |
setUseObjectStreams(boolean isUseObjectStreams)
Sets the setting which controls how the parser stores objects in the documents. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ENCRYPTION_AES
public static final int ENCRYPTION_NONE
public static final int ENCRYPTION_RC4
public static final int FORMAT_G3CCITT
public static final int FORMAT_G4CCITT
public static final int FORMAT_GZIP
public static final int FORMAT_JPEG
public static final int FORMAT_RAW
public static final int FORMAT_UNCHANGED
public static final int PDFFORMAT_COMPATIBLE
public static final int PDFFORMAT_PURE
public static final int SECURITY_CERTIFICATE_PROTECTED
public static final int SECURITY_NONE
public static final int SECURITY_PASSWORD_PROTECTED
public static final int SIGN_COMPATIBLE
public static final int SIGN_LEGACY
public static final int SIGN_WINDOWS
public ICredentials openCredentials
public RenderingParameters params
| Constructor Detail |
|---|
public Preferences()
| Method Detail |
|---|
public java.lang.Object clone()
clone in class java.lang.Objectpublic int getBlackAndWhiteImageCompression()
public int getColorAndGrayscaleImageCompression()
public ICredentialsCreation getDefaultCredentials()
public int getDefaultEncryptionKeyLength()
public int getDefaultEncryptionType()
public java.awt.print.PageFormat getDefaultPageFormat()
public int getDefaultPDFFormat()
public float getDefaultPDFVersion()
public int getDefaultSecurityType()
public int getDefaultSignatureType()
public java.lang.String getJceProvider()
public int getLoosyCompressionQuality()
public boolean getShowAuthenticationGUI()
public int getTabSize()
public boolean isCompressed()
public boolean isDownSampleImages()
public boolean isGenerateAnnotations()
public boolean isGenerateStringsAsGlyph()
public boolean isUseObjectStreams()
public void setBlackAndWhiteImageCompression(int bwAlgorithm)
throws PdfException
bwAlgorithm - a constant representing the algorithm to use
PdfException - parameter validation error
public void setColorAndGrayscaleImageCompression(int colorAlgorithm)
throws PdfException
colorAlgorithm - a constant representing the algorithm to use.
PdfException - parameter validation errorpublic void setCompressed(boolean compress)
compress - a boolean valuepublic void setDefaultCredentials(ICredentialsCreation credentials)
public void setDefaultEncryptionKeyLength(int theKeyLength)
throws PdfException
theKeyLength - size in bits of the key (defaults to 40), must be a multiple
of 8
PdfException - parameter validation error
public void setDefaultEncryptionType(int encryptionType)
throws PdfException
encryptionType -
PdfExceptionpublic void setDefaultPageFormat(java.awt.print.PageFormat pageSize)
pageSize - the default page size for new pages
public void setDefaultPDFFormat(int format)
throws PdfException
format - true if document is generated for Acrobat 6+ only
PdfExceptionpublic void setDefaultPDFVersion(float version)
version - the new document version or null to reset the property to its
builtin defaults.
public void setDefaultSecurityType(int securityType)
throws PdfException
PdfException
public void setDefaultSignatureType(int signLevel)
throws PdfException
signLevel - the signature level to create
PdfException - parameter validation errorsspublic void setDownSampleImages(boolean downSample)
downSample - true to downsample imagespublic void setGenerateAnnotations(boolean isGenerateAnnotations)
isGenerateAnnotations - true to let jPDF render the annotations.public void setGenerateStringsAsGlyph(boolean thedrawStringsAsGlyph)
public void setJceProvider(java.lang.String provider)
provider - a unique JCE identifierpublic void setLoosyCompressionQuality(int theQuality)
theQuality - an integer for 0 to 100 used to specify the image quality
(only applies to JPG compression)public void setShowAuthenticationGUI(boolean showAuthenticationGUI)
showAuthenticationGUI - if true, a dialog is displayed when the credentials are
invalidpublic void setTabSize(int value)
value - The number of Space character to usepublic void setUseObjectStreams(boolean isUseObjectStreams)
isUseObjectStreams - true if the parser can use objectstreams
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||