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 -
Method Summary
Modifier and TypeMethodDescriptionAn exporter hint property representing the allowed permissions for the generated PDF document.An exporter hint property representing the denied permissions for the generated PDF document.The path to the ICC profile file needed for CMYK color conversion and/or the PDF/A compliance.The Author of the PDF document.The Creator or Application for the PDF document.The Keywords of the PDF document, as comma-separated String.The Producer of the PDF document.The Subject of the PDF document.The Title of the PDF document.The password belonging to the owner of the document, if it is encrypted.The Conformance level of the PDF/A document.The user defined JavaScript piece of code to be inserted in the generated PDF document.Returns a Character instance representing the version of the generated PDF.An integer value representing the PDF permissions for the generated document.Setting specifying the print scaling preference in the PDF print dialog.Specifies the language that the exporter should put in the language tag of the generated PDF.The user password needed to open the document, if it is encrypted.Returns a boolean value specifying whether the encryption key is 128 bits.Returns a boolean value specifying whether the PDF document should be compressed.Returns a boolean value specifying whether the PDF document should contain an outline section.Specifies whether the document title should be displayed in the title bar instead of the file name.Specifies whether the ICC profile, which in this case must be provided byPdfExporterConfiguration.getIccProfilePath()
, is embedded into the PDF.Returns a boolean value specifying whether the final PDF document should be encrypted.isTagged()
Specifies whether the exporter should put structure tags in the generated PDF.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
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
-
Constructor Details
-
SimplePdfExporterConfiguration
public SimplePdfExporterConfiguration()
-
-
Method Details
-
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:
-
setCreatingBatchModeBookmarks
-
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:
-
setCompressed
-
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:
-
setEncrypted
-
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:
-
set128BitKey
-
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:
-
setUserPassword
-
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:
-
setOwnerPassword
-
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:
-
setPdfVersion
-
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:
-
setPdfJavaScript
-
getPrintScaling
Description copied from interface:PdfExporterConfiguration
Setting specifying the print scaling preference in the PDF print dialog.- Specified by:
getPrintScaling
in interfacePdfExporterConfiguration
-
setPrintScaling
-
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:
-
setTagged
-
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:
-
setTagLanguage
-
getPdfaConformance
Description copied from interface:PdfExporterConfiguration
The Conformance level of the PDF/A document.- Specified by:
getPdfaConformance
in interfacePdfExporterConfiguration
- See Also:
-
setPdfaConformance
-
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:
-
setIccProfilePath
-
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:
-
setEmbedIccProfile
-
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:
-
setUseCMYKColors
-
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
-
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
-
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
-
getMetadataTitle
Description copied from interface:PdfExporterConfiguration
The Title of the PDF document.- Specified by:
getMetadataTitle
in interfacePdfExporterConfiguration
-
setMetadataTitle
-
getMetadataAuthor
Description copied from interface:PdfExporterConfiguration
The Author of the PDF document.- Specified by:
getMetadataAuthor
in interfacePdfExporterConfiguration
-
setMetadataAuthor
-
getMetadataSubject
Description copied from interface:PdfExporterConfiguration
The Subject of the PDF document.- Specified by:
getMetadataSubject
in interfacePdfExporterConfiguration
-
setMetadataSubject
-
getMetadataKeywords
Description copied from interface:PdfExporterConfiguration
The Keywords of the PDF document, as comma-separated String.- Specified by:
getMetadataKeywords
in interfacePdfExporterConfiguration
-
setMetadataKeywords
-
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
-
getMetadataProducer
Description copied from interface:PdfExporterConfiguration
The Producer of the PDF document.- Specified by:
getMetadataProducer
in interfacePdfExporterConfiguration
-
setMetadataProducer
-
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:
-
setDisplayMetadataTitle
-