Package net.sf.jasperreports.pdf
Class SimplePdfExporterConfiguration
- java.lang.Object
-
- net.sf.jasperreports.export.SimpleCommonExportConfiguration
-
- net.sf.jasperreports.export.SimpleExporterConfiguration
-
- net.sf.jasperreports.pdf.SimplePdfExporterConfiguration
-
- All Implemented Interfaces:
CommonExportConfiguration
,ExporterConfiguration
,PdfExporterConfiguration
public class SimplePdfExporterConfiguration extends SimpleExporterConfiguration implements PdfExporterConfiguration
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from interface net.sf.jasperreports.export.CommonExportConfiguration
PROPERTY_EXPORT_CONFIGURATION_OVERRIDE_REPORT_HINTS
-
Fields inherited from interface net.sf.jasperreports.pdf.PdfExporterConfiguration
ALL_PERMISSIONS, PROPERTY_128_BIT_KEY, PROPERTY_COMPRESSED, PROPERTY_CREATE_BATCH_MODE_BOOKMARKS, PROPERTY_DISPLAY_METADATA_TITLE, PROPERTY_EMBED_ICC_PROFILE, PROPERTY_ENCRYPTED, PROPERTY_JUSTIFIED_LETTER_SPACING, PROPERTY_METADATA_AUTHOR, PROPERTY_METADATA_CREATOR, PROPERTY_METADATA_KEYWORDS, PROPERTY_METADATA_PRODUCER, PROPERTY_METADATA_SUBJECT, PROPERTY_METADATA_TITLE, PROPERTY_OWNER_PASSWORD, PROPERTY_PDF_JAVASCRIPT, PROPERTY_PDF_VERSION, PROPERTY_PDFA_CONFORMANCE, PROPERTY_PDFA_ICC_PROFILE_PATH, PROPERTY_PERMISSIONS_ALLOWED, PROPERTY_PERMISSIONS_DENIED, PROPERTY_PRINT_SCALING, PROPERTY_TAG_LANGUAGE, PROPERTY_TAGGED, PROPERTY_USE_CMYK_COLORS, PROPERTY_USER_PASSWORD
-
-
Constructor Summary
Constructors Constructor Description SimplePdfExporterConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllowedPermissions()
An exporter hint property representing the allowed permissions for the generated PDF document.String
getDeniedPermissions()
An exporter hint property representing the denied permissions for the generated PDF document.String
getIccProfilePath()
The path to the ICC profile file needed for CMYK color conversion and/or the PDF/A compliance.String
getMetadataAuthor()
The Author of the PDF document.String
getMetadataCreator()
The Creator or Application for the PDF document.String
getMetadataKeywords()
The Keywords of the PDF document, as comma-separated String.String
getMetadataProducer()
The Producer of the PDF document.String
getMetadataSubject()
The Subject of the PDF document.String
getMetadataTitle()
The Title of the PDF document.String
getOwnerPassword()
The password belonging to the owner of the document, if it is encrypted.PdfaConformanceEnum
getPdfaConformance()
The Conformance level of the PDF/A document.String
getPdfJavaScript()
The user defined JavaScript piece of code to be inserted in the generated PDF document.PdfVersionEnum
getPdfVersion()
Returns a Character instance representing the version of the generated PDF.Integer
getPermissions()
An integer value representing the PDF permissions for the generated document.PdfPrintScalingEnum
getPrintScaling()
Setting specifying the print scaling preference in the PDF print dialog.String
getTagLanguage()
Specifies the language that the exporter should put in the language tag of the generated PDF.String
getUserPassword()
The user password needed to open the document, if it is encrypted.Boolean
is128BitKey()
Returns a boolean value specifying whether the encryption key is 128 bits.Boolean
isCompressed()
Returns a boolean value specifying whether the PDF document should be compressed.Boolean
isCreatingBatchModeBookmarks()
Returns a boolean value specifying whether the PDF document should contain an outline section.Boolean
isDisplayMetadataTitle()
Specifies whether the document title should be displayed in the title bar instead of the file name.Boolean
isEmbedIccProfile()
Specifies whether the ICC profile, which in this case must be provided byPdfExporterConfiguration.getIccProfilePath()
, is embedded into the PDF.Boolean
isEncrypted()
Returns a boolean value specifying whether the final PDF document should be encrypted.Boolean
isTagged()
Specifies whether the exporter should put structure tags in the generated PDF.Boolean
isUseCMYKColors()
Specifies whether the ICC profile, which in this case must be provided byPdfExporterConfiguration.getIccProfilePath()
, is used to convert colors from RGB to CMYK color space.void
set128BitKey(Boolean is128BitKey)
void
setAllowedPermissionsHint(String allowedPermissionsHint)
void
setCompressed(Boolean isCompressed)
void
setCreatingBatchModeBookmarks(Boolean isCreatingBatchModeBookmarks)
void
setDeniedPermissionsHint(String deniedPermissionsHint)
void
setDisplayMetadataTitle(Boolean displayMetadataTitle)
void
setEmbedIccProfile(Boolean isEmbedIccProfile)
void
setEncrypted(Boolean isEncrypted)
void
setIccProfilePath(String iccProfilePath)
void
setMetadataAuthor(String metadataAuthor)
void
setMetadataCreator(String metadataCreator)
void
setMetadataKeywords(String metadataKeywords)
void
setMetadataProducer(String metadataProducer)
void
setMetadataSubject(String metadataSubject)
void
setMetadataTitle(String metadataTitle)
void
setOwnerPassword(String ownerPassword)
void
setPdfaConformance(PdfaConformanceEnum pdfaConformance)
void
setPdfJavaScript(String pdfJavaScript)
void
setPdfVersion(PdfVersionEnum pdfVersion)
void
setPermissions(Integer permissions)
void
setPrintScaling(PdfPrintScalingEnum printScaling)
void
setTagged(Boolean isTagged)
void
setTagLanguage(String tagLanguage)
void
setUseCMYKColors(Boolean isUseCMYKColors)
void
setUserPassword(String userPassword)
-
Methods inherited from class net.sf.jasperreports.export.SimpleCommonExportConfiguration
isOverrideHints, setOverrideHints
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.export.CommonExportConfiguration
isOverrideHints
-
-
-
-
Method Detail
-
isCreatingBatchModeBookmarks
public Boolean isCreatingBatchModeBookmarks()
Description copied from interface:PdfExporterConfiguration
Returns a boolean value specifying whether the PDF document should contain an outline section.- Specified by:
isCreatingBatchModeBookmarks
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_CREATE_BATCH_MODE_BOOKMARKS
-
setCreatingBatchModeBookmarks
public void setCreatingBatchModeBookmarks(Boolean isCreatingBatchModeBookmarks)
-
isCompressed
public Boolean isCompressed()
Description copied from interface:PdfExporterConfiguration
Returns a boolean value specifying whether the PDF document should be compressed.- Specified by:
isCompressed
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_COMPRESSED
-
setCompressed
public void setCompressed(Boolean isCompressed)
-
isEncrypted
public Boolean isEncrypted()
Description copied from interface:PdfExporterConfiguration
Returns a boolean value specifying whether the final PDF document should be encrypted. When set toBoolean.TRUE
, this parameter instructs the exporter to encrypt the resulting PDF document. By default PDF files are not encrypted.- Specified by:
isEncrypted
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_ENCRYPTED
-
setEncrypted
public void setEncrypted(Boolean isEncrypted)
-
is128BitKey
public Boolean is128BitKey()
Description copied from interface:PdfExporterConfiguration
Returns a boolean value specifying whether the encryption key is 128 bits. The PDF exporter can encrypt the files using either a 40-bit key or a 128-bit key. By default, it uses a 40-bit key, but if you set this flag toBoolean.TRUE
, it can be configured to use a 128-bit key for stronger encryption.- Specified by:
is128BitKey
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_128_BIT_KEY
-
set128BitKey
public void set128BitKey(Boolean is128BitKey)
-
getUserPassword
public String getUserPassword()
Description copied from interface:PdfExporterConfiguration
The user password needed to open the document, if it is encrypted.- Specified by:
getUserPassword
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_USER_PASSWORD
-
setUserPassword
public void setUserPassword(String userPassword)
-
getOwnerPassword
public String getOwnerPassword()
Description copied from interface:PdfExporterConfiguration
The password belonging to the owner of the document, if it is encrypted. If the password is null, it will be replaced by a random string, so that access is denied to all would-be owners.- Specified by:
getOwnerPassword
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_OWNER_PASSWORD
-
setOwnerPassword
public void setOwnerPassword(String ownerPassword)
-
getPdfVersion
public PdfVersionEnum getPdfVersion()
Description copied from interface:PdfExporterConfiguration
Returns a Character instance representing the version of the generated PDF. This class contains predefined constants that can be passed as parameters directly.- Specified by:
getPdfVersion
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_PDF_VERSION
-
setPdfVersion
public void setPdfVersion(PdfVersionEnum pdfVersion)
-
getPdfJavaScript
public String getPdfJavaScript()
Description copied from interface:PdfExporterConfiguration
The user defined JavaScript piece of code to be inserted in the generated PDF document.- Specified by:
getPdfJavaScript
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_PDF_JAVASCRIPT
-
setPdfJavaScript
public void setPdfJavaScript(String pdfJavaScript)
-
getPrintScaling
public PdfPrintScalingEnum getPrintScaling()
Description copied from interface:PdfExporterConfiguration
Setting specifying the print scaling preference in the PDF print dialog.- Specified by:
getPrintScaling
in interfacePdfExporterConfiguration
-
setPrintScaling
public void setPrintScaling(PdfPrintScalingEnum printScaling)
-
isTagged
public Boolean isTagged()
Description copied from interface:PdfExporterConfiguration
Specifies whether the exporter should put structure tags in the generated PDF.- Specified by:
isTagged
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_TAGGED
-
setTagged
public void setTagged(Boolean isTagged)
-
getTagLanguage
public String getTagLanguage()
Description copied from interface:PdfExporterConfiguration
Specifies the language that the exporter should put in the language tag of the generated PDF.- Specified by:
getTagLanguage
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_TAG_LANGUAGE
-
setTagLanguage
public void setTagLanguage(String tagLanguage)
-
getPdfaConformance
public PdfaConformanceEnum getPdfaConformance()
Description copied from interface:PdfExporterConfiguration
The Conformance level of the PDF/A document.- Specified by:
getPdfaConformance
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_PDFA_CONFORMANCE
-
setPdfaConformance
public void setPdfaConformance(PdfaConformanceEnum pdfaConformance)
-
getIccProfilePath
public String getIccProfilePath()
Description copied from interface:PdfExporterConfiguration
The path to the ICC profile file needed for CMYK color conversion and/or the PDF/A compliance.- Specified by:
getIccProfilePath
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_PDFA_ICC_PROFILE_PATH
-
setIccProfilePath
public void setIccProfilePath(String iccProfilePath)
-
isEmbedIccProfile
public Boolean isEmbedIccProfile()
Description copied from interface:PdfExporterConfiguration
Specifies whether the ICC profile, which in this case must be provided byPdfExporterConfiguration.getIccProfilePath()
, is embedded into the PDF. PDFA compliance requires embedding the ICC profile, which inhibits this setting.- Specified by:
isEmbedIccProfile
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_USE_CMYK_COLORS
-
setEmbedIccProfile
public void setEmbedIccProfile(Boolean isEmbedIccProfile)
-
isUseCMYKColors
public Boolean isUseCMYKColors()
Description copied from interface:PdfExporterConfiguration
Specifies whether the ICC profile, which in this case must be provided byPdfExporterConfiguration.getIccProfilePath()
, is used to convert colors from RGB to CMYK color space.- Specified by:
isUseCMYKColors
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_USE_CMYK_COLORS
-
setUseCMYKColors
public void setUseCMYKColors(Boolean isUseCMYKColors)
-
getPermissions
public Integer getPermissions()
Description copied from interface:PdfExporterConfiguration
An integer value representing the PDF permissions for the generated document. The open permissions for the document can be ALLOW_PRINTING, ALLOW_MODIFY_CONTENTS, ALLOW_COPY, ALLOW_MODIFY_ANNOTATIONS, ALLOW_FILL_IN, ALLOW_SCREENREADERS, ALLOW_ASSEMBLY and ALLOW_DEGRADED_PRINTING (these can all be found in the PdfWriter class of OpenPDF library). The permissions can be combined by applying bitwise OR to them.- Specified by:
getPermissions
in interfacePdfExporterConfiguration
-
setPermissions
public void setPermissions(Integer permissions)
-
getAllowedPermissions
public String getAllowedPermissions()
Description copied from interface:PdfExporterConfiguration
An exporter hint property representing the allowed permissions for the generated PDF document. Allowed permissions for the document can be PRINTING, MODIFY_CONTENTS, COPY, MODIFY_ANNOTATIONS, FILL_IN,SCREENREADERS, ASSEMBLY, DEGRADED_PRINTING and ALL. Different permissions are separated by a pipe (|) character.- Specified by:
getAllowedPermissions
in interfacePdfExporterConfiguration
-
setAllowedPermissionsHint
public void setAllowedPermissionsHint(String allowedPermissionsHint)
-
getDeniedPermissions
public String getDeniedPermissions()
Description copied from interface:PdfExporterConfiguration
An exporter hint property representing the denied permissions for the generated PDF document. Denied permissions for the document can be PRINTING, MODIFY_CONTENTS, COPY, MODIFY_ANNOTATIONS, FILL_IN,SCREENREADERS, ASSEMBLY, DEGRADED_PRINTING and ALL. Different permissions are separated by a pipe (|) character.- Specified by:
getDeniedPermissions
in interfacePdfExporterConfiguration
-
setDeniedPermissionsHint
public void setDeniedPermissionsHint(String deniedPermissionsHint)
-
getMetadataTitle
public String getMetadataTitle()
Description copied from interface:PdfExporterConfiguration
The Title of the PDF document.- Specified by:
getMetadataTitle
in interfacePdfExporterConfiguration
-
setMetadataTitle
public void setMetadataTitle(String metadataTitle)
-
getMetadataAuthor
public String getMetadataAuthor()
Description copied from interface:PdfExporterConfiguration
The Author of the PDF document.- Specified by:
getMetadataAuthor
in interfacePdfExporterConfiguration
-
setMetadataAuthor
public void setMetadataAuthor(String metadataAuthor)
-
getMetadataSubject
public String getMetadataSubject()
Description copied from interface:PdfExporterConfiguration
The Subject of the PDF document.- Specified by:
getMetadataSubject
in interfacePdfExporterConfiguration
-
setMetadataSubject
public void setMetadataSubject(String metadataSubject)
-
getMetadataKeywords
public String getMetadataKeywords()
Description copied from interface:PdfExporterConfiguration
The Keywords of the PDF document, as comma-separated String.- Specified by:
getMetadataKeywords
in interfacePdfExporterConfiguration
-
setMetadataKeywords
public void setMetadataKeywords(String metadataKeywords)
-
getMetadataCreator
public String getMetadataCreator()
Description copied from interface:PdfExporterConfiguration
The Creator or Application for the PDF document. Defaults to "JasperReports Library version x.x.x".- Specified by:
getMetadataCreator
in interfacePdfExporterConfiguration
-
setMetadataCreator
public void setMetadataCreator(String metadataCreator)
-
getMetadataProducer
public String getMetadataProducer()
Description copied from interface:PdfExporterConfiguration
The Producer of the PDF document.- Specified by:
getMetadataProducer
in interfacePdfExporterConfiguration
-
setMetadataProducer
public void setMetadataProducer(String metadataProducer)
-
isDisplayMetadataTitle
public Boolean isDisplayMetadataTitle()
Description copied from interface:PdfExporterConfiguration
Specifies whether the document title should be displayed in the title bar instead of the file name.- Specified by:
isDisplayMetadataTitle
in interfacePdfExporterConfiguration
- See Also:
PdfExporterConfiguration.PROPERTY_DISPLAY_METADATA_TITLE
-
setDisplayMetadataTitle
public void setDisplayMetadataTitle(Boolean displayMetadataTitle)
-
-