Package net.sf.jasperreports.export
Class SimplePdfExporterConfiguration
- java.lang.Object
-
- net.sf.jasperreports.export.SimpleCommonExportConfiguration
-
- net.sf.jasperreports.export.SimpleExporterConfiguration
-
- net.sf.jasperreports.export.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.export.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_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 java.lang.StringgetAllowedPermissions()An exporter hint property representing the allowed permissions for the generated PDF document.java.lang.StringgetDeniedPermissions()An exporter hint property representing the denied permissions for the generated PDF document.java.lang.StringgetIccProfilePath()The path to the ICC profile file needed for CMYK color conversion and/or the PDF/A compliance.java.lang.StringgetMetadataAuthor()The Author of the PDF document.java.lang.StringgetMetadataCreator()The Creator or Application for the PDF document.java.lang.StringgetMetadataKeywords()The Keywords of the PDF document, as comma-separated String.java.lang.StringgetMetadataSubject()The Subject of the PDF document.java.lang.StringgetMetadataTitle()The Title of the PDF document.java.lang.StringgetOwnerPassword()The password belonging to the owner of the document, if it is encrypted.PdfaConformanceEnumgetPdfaConformance()The Conformance level of the PDF/A document.java.lang.StringgetPdfJavaScript()The user defined JavaScript piece of code to be inserted in the generated PDF document.PdfVersionEnumgetPdfVersion()Returns a Character instance representing the version of the generated PDF.java.lang.IntegergetPermissions()An integer value representing the PDF permissions for the generated document.PdfPrintScalingEnumgetPrintScaling()Setting specifying the print scaling preference in the PDF print dialog.java.lang.StringgetTagLanguage()Specifies the language that the exporter should put in the language tag of the generated PDF.java.lang.StringgetUserPassword()The user password needed to open the document, if it is encrypted.java.lang.Booleanis128BitKey()Returns a boolean value specifying whether the encryption key is 128 bits.java.lang.BooleanisCompressed()Returns a boolean value specifying whether the PDF document should be compressed.java.lang.BooleanisCreatingBatchModeBookmarks()Returns a boolean value specifying whether the PDF document should contain an outline section.java.lang.BooleanisDisplayMetadataTitle()Specifies whether the document title should be displayed in the title bar instead of the file name.java.lang.BooleanisEmbedIccProfile()Specifies whether the ICC profile, which in this case must be provided byPdfExporterConfiguration.getIccProfilePath(), is embedded into the PDF.java.lang.BooleanisEncrypted()Returns a boolean value specifying whether the final PDF document should be encrypted.java.lang.BooleanisTagged()Specifies whether the exporter should put structure tags in the generated PDF.java.lang.BooleanisUseCMYKColors()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.voidset128BitKey(java.lang.Boolean is128BitKey)voidsetAllowedPermissionsHint(java.lang.String allowedPermissionsHint)voidsetCompressed(java.lang.Boolean isCompressed)voidsetCreatingBatchModeBookmarks(java.lang.Boolean isCreatingBatchModeBookmarks)voidsetDeniedPermissionsHint(java.lang.String deniedPermissionsHint)voidsetDisplayMetadataTitle(java.lang.Boolean displayMetadataTitle)voidsetEmbedIccProfile(java.lang.Boolean isEmbedIccProfile)voidsetEncrypted(java.lang.Boolean isEncrypted)voidsetIccProfilePath(java.lang.String iccProfilePath)voidsetMetadataAuthor(java.lang.String metadataAuthor)voidsetMetadataCreator(java.lang.String metadataCreator)voidsetMetadataKeywords(java.lang.String metadataKeywords)voidsetMetadataSubject(java.lang.String metadataSubject)voidsetMetadataTitle(java.lang.String metadataTitle)voidsetOwnerPassword(java.lang.String ownerPassword)voidsetPdfaConformance(PdfaConformanceEnum pdfaConformance)voidsetPdfJavaScript(java.lang.String pdfJavaScript)voidsetPdfVersion(PdfVersionEnum pdfVersion)voidsetPermissions(java.lang.Integer permissions)voidsetPrintScaling(PdfPrintScalingEnum printScaling)voidsetTagged(java.lang.Boolean isTagged)voidsetTagLanguage(java.lang.String tagLanguage)voidsetUseCMYKColors(java.lang.Boolean isUseCMYKColors)voidsetUserPassword(java.lang.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 java.lang.Boolean isCreatingBatchModeBookmarks()
Description copied from interface:PdfExporterConfigurationReturns a boolean value specifying whether the PDF document should contain an outline section.- Specified by:
isCreatingBatchModeBookmarksin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_CREATE_BATCH_MODE_BOOKMARKS
-
setCreatingBatchModeBookmarks
public void setCreatingBatchModeBookmarks(java.lang.Boolean isCreatingBatchModeBookmarks)
-
isCompressed
public java.lang.Boolean isCompressed()
Description copied from interface:PdfExporterConfigurationReturns a boolean value specifying whether the PDF document should be compressed.- Specified by:
isCompressedin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_COMPRESSED
-
setCompressed
public void setCompressed(java.lang.Boolean isCompressed)
-
isEncrypted
public java.lang.Boolean isEncrypted()
Description copied from interface:PdfExporterConfigurationReturns 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:
isEncryptedin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_ENCRYPTED
-
setEncrypted
public void setEncrypted(java.lang.Boolean isEncrypted)
-
is128BitKey
public java.lang.Boolean is128BitKey()
Description copied from interface:PdfExporterConfigurationReturns 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:
is128BitKeyin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_128_BIT_KEY
-
set128BitKey
public void set128BitKey(java.lang.Boolean is128BitKey)
-
getUserPassword
public java.lang.String getUserPassword()
Description copied from interface:PdfExporterConfigurationThe user password needed to open the document, if it is encrypted.- Specified by:
getUserPasswordin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_USER_PASSWORD
-
setUserPassword
public void setUserPassword(java.lang.String userPassword)
-
getOwnerPassword
public java.lang.String getOwnerPassword()
Description copied from interface:PdfExporterConfigurationThe 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:
getOwnerPasswordin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_OWNER_PASSWORD
-
setOwnerPassword
public void setOwnerPassword(java.lang.String ownerPassword)
-
getPdfVersion
public PdfVersionEnum getPdfVersion()
Description copied from interface:PdfExporterConfigurationReturns a Character instance representing the version of the generated PDF. This class contains predefined constants that can be passed as parameters directly.- Specified by:
getPdfVersionin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_PDF_VERSION
-
setPdfVersion
public void setPdfVersion(PdfVersionEnum pdfVersion)
-
getPdfJavaScript
public java.lang.String getPdfJavaScript()
Description copied from interface:PdfExporterConfigurationThe user defined JavaScript piece of code to be inserted in the generated PDF document.- Specified by:
getPdfJavaScriptin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_PDF_JAVASCRIPT
-
setPdfJavaScript
public void setPdfJavaScript(java.lang.String pdfJavaScript)
-
getPrintScaling
public PdfPrintScalingEnum getPrintScaling()
Description copied from interface:PdfExporterConfigurationSetting specifying the print scaling preference in the PDF print dialog.- Specified by:
getPrintScalingin interfacePdfExporterConfiguration
-
setPrintScaling
public void setPrintScaling(PdfPrintScalingEnum printScaling)
-
isTagged
public java.lang.Boolean isTagged()
Description copied from interface:PdfExporterConfigurationSpecifies whether the exporter should put structure tags in the generated PDF.- Specified by:
isTaggedin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_TAGGED
-
setTagged
public void setTagged(java.lang.Boolean isTagged)
-
getTagLanguage
public java.lang.String getTagLanguage()
Description copied from interface:PdfExporterConfigurationSpecifies the language that the exporter should put in the language tag of the generated PDF.- Specified by:
getTagLanguagein interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_TAG_LANGUAGE
-
setTagLanguage
public void setTagLanguage(java.lang.String tagLanguage)
-
getPdfaConformance
public PdfaConformanceEnum getPdfaConformance()
Description copied from interface:PdfExporterConfigurationThe Conformance level of the PDF/A document.- Specified by:
getPdfaConformancein interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_PDFA_CONFORMANCE
-
setPdfaConformance
public void setPdfaConformance(PdfaConformanceEnum pdfaConformance)
-
getIccProfilePath
public java.lang.String getIccProfilePath()
Description copied from interface:PdfExporterConfigurationThe path to the ICC profile file needed for CMYK color conversion and/or the PDF/A compliance.- Specified by:
getIccProfilePathin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_PDFA_ICC_PROFILE_PATH
-
setIccProfilePath
public void setIccProfilePath(java.lang.String iccProfilePath)
-
isEmbedIccProfile
public java.lang.Boolean isEmbedIccProfile()
Description copied from interface:PdfExporterConfigurationSpecifies 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:
isEmbedIccProfilein interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_USE_CMYK_COLORS
-
setEmbedIccProfile
public void setEmbedIccProfile(java.lang.Boolean isEmbedIccProfile)
-
isUseCMYKColors
public java.lang.Boolean isUseCMYKColors()
Description copied from interface:PdfExporterConfigurationSpecifies 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:
isUseCMYKColorsin interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_USE_CMYK_COLORS
-
setUseCMYKColors
public void setUseCMYKColors(java.lang.Boolean isUseCMYKColors)
-
getPermissions
public java.lang.Integer getPermissions()
Description copied from interface:PdfExporterConfigurationAn 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:
getPermissionsin interfacePdfExporterConfiguration
-
setPermissions
public void setPermissions(java.lang.Integer permissions)
-
getAllowedPermissions
public java.lang.String getAllowedPermissions()
Description copied from interface:PdfExporterConfigurationAn 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:
getAllowedPermissionsin interfacePdfExporterConfiguration
-
setAllowedPermissionsHint
public void setAllowedPermissionsHint(java.lang.String allowedPermissionsHint)
-
getDeniedPermissions
public java.lang.String getDeniedPermissions()
Description copied from interface:PdfExporterConfigurationAn 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:
getDeniedPermissionsin interfacePdfExporterConfiguration
-
setDeniedPermissionsHint
public void setDeniedPermissionsHint(java.lang.String deniedPermissionsHint)
-
getMetadataTitle
public java.lang.String getMetadataTitle()
Description copied from interface:PdfExporterConfigurationThe Title of the PDF document.- Specified by:
getMetadataTitlein interfacePdfExporterConfiguration
-
setMetadataTitle
public void setMetadataTitle(java.lang.String metadataTitle)
-
getMetadataAuthor
public java.lang.String getMetadataAuthor()
Description copied from interface:PdfExporterConfigurationThe Author of the PDF document.- Specified by:
getMetadataAuthorin interfacePdfExporterConfiguration
-
setMetadataAuthor
public void setMetadataAuthor(java.lang.String metadataAuthor)
-
getMetadataSubject
public java.lang.String getMetadataSubject()
Description copied from interface:PdfExporterConfigurationThe Subject of the PDF document.- Specified by:
getMetadataSubjectin interfacePdfExporterConfiguration
-
setMetadataSubject
public void setMetadataSubject(java.lang.String metadataSubject)
-
getMetadataKeywords
public java.lang.String getMetadataKeywords()
Description copied from interface:PdfExporterConfigurationThe Keywords of the PDF document, as comma-separated String.- Specified by:
getMetadataKeywordsin interfacePdfExporterConfiguration
-
setMetadataKeywords
public void setMetadataKeywords(java.lang.String metadataKeywords)
-
getMetadataCreator
public java.lang.String getMetadataCreator()
Description copied from interface:PdfExporterConfigurationThe Creator or Application for the PDF document. Defaults to "JasperReports Library version x.x.x".- Specified by:
getMetadataCreatorin interfacePdfExporterConfiguration
-
setMetadataCreator
public void setMetadataCreator(java.lang.String metadataCreator)
-
isDisplayMetadataTitle
public java.lang.Boolean isDisplayMetadataTitle()
Description copied from interface:PdfExporterConfigurationSpecifies whether the document title should be displayed in the title bar instead of the file name.- Specified by:
isDisplayMetadataTitlein interfacePdfExporterConfiguration- See Also:
PdfExporterConfiguration.PROPERTY_DISPLAY_METADATA_TITLE
-
setDisplayMetadataTitle
public void setDisplayMetadataTitle(java.lang.Boolean displayMetadataTitle)
-
-