net.sf.dynamicreports.jasper.base.export.JasperPdfExporter Maven / Gradle / Ivy
Show all versions of dynamicreports-core Show documentation
/*
* DynamicReports - Free Java reporting library for creating reports dynamically
*
* Copyright (C) 2010 - 2018 Ricardo Mariaca and the Dynamic Reports Contributors
*
* This file is part of DynamicReports.
*
* DynamicReports is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DynamicReports is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with DynamicReports. If not, see .
*/
package net.sf.dynamicreports.jasper.base.export;
import net.sf.dynamicreports.jasper.constant.PdfPermission;
import net.sf.dynamicreports.jasper.constant.PdfVersion;
import net.sf.dynamicreports.jasper.definition.export.JasperIPdfExporter;
import net.sf.dynamicreports.report.constant.Constants;
import net.sf.dynamicreports.report.constant.PdfPrintScaling;
import net.sf.dynamicreports.report.constant.PdfaConformance;
import java.util.ArrayList;
import java.util.List;
/**
* JasperPdfExporter class.
*
* @author Ricardo Mariaca
*
*/
public class JasperPdfExporter extends AbstractJasperExporter implements JasperIPdfExporter {
private static final long serialVersionUID = Constants.SERIAL_VERSION_UID;
private Boolean creatingBatchModeBookmarks;
private Boolean compressed;
private Boolean encrypted;
private Boolean bitKey128;
private String userPassword;
private String ownerPassword;
private List permissions;
private PdfVersion pdfVersion;
private String metadataTitle;
private String metadataAuthor;
private String metadataSubject;
private String metadataKeyWords;
private String metadataCreator;
private Boolean forceSvgShapes;
private String pdfJavaScript;
private Boolean tagged;
private String tagLanguage;
private Boolean collapseMissingBookmarkLevels;
private Boolean sizePageToContent;
private Boolean ignoreHyperLink;
private Boolean forceLineBreakPolicy;
private PdfPrintScaling printScaling;
private PdfaConformance pdfaConformance;
private String iccProfilePath;
private String allowedPermissionsHint;
private String deniedPermissionsHint;
private Boolean displayMetadataTitle;
/**
* Constructor for JasperPdfExporter.
*/
public JasperPdfExporter() {
permissions = new ArrayList();
}
/** {@inheritDoc} */
@Override
public Boolean getCreatingBatchModeBookmarks() {
return creatingBatchModeBookmarks;
}
/**
* Setter for the field creatingBatchModeBookmarks
.
*
* @param creatingBatchModeBookmarks a {@link java.lang.Boolean} object.
*/
public void setCreatingBatchModeBookmarks(Boolean creatingBatchModeBookmarks) {
this.creatingBatchModeBookmarks = creatingBatchModeBookmarks;
}
/** {@inheritDoc} */
@Override
public Boolean getCompressed() {
return compressed;
}
/**
* Setter for the field compressed
.
*
* @param compressed a {@link java.lang.Boolean} object.
*/
public void setCompressed(Boolean compressed) {
this.compressed = compressed;
}
/** {@inheritDoc} */
@Override
public Boolean getEncrypted() {
return encrypted;
}
/**
* Setter for the field encrypted
.
*
* @param encrypted a {@link java.lang.Boolean} object.
*/
public void setEncrypted(Boolean encrypted) {
this.encrypted = encrypted;
}
/** {@inheritDoc} */
@Override
public Boolean getBitKey128() {
return bitKey128;
}
/**
* Setter for the field bitKey128
.
*
* @param bitKey128 a {@link java.lang.Boolean} object.
*/
public void setBitKey128(Boolean bitKey128) {
this.bitKey128 = bitKey128;
}
/** {@inheritDoc} */
@Override
public String getUserPassword() {
return userPassword;
}
/**
* Setter for the field userPassword
.
*
* @param userPassword a {@link java.lang.String} object.
*/
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}
/** {@inheritDoc} */
@Override
public String getOwnerPassword() {
return ownerPassword;
}
/**
* Setter for the field ownerPassword
.
*
* @param ownerPassword a {@link java.lang.String} object.
*/
public void setOwnerPassword(String ownerPassword) {
this.ownerPassword = ownerPassword;
}
/** {@inheritDoc} */
@Override
public List getPermissions() {
return permissions;
}
/**
* Setter for the field permissions
.
*
* @param permissions a {@link java.util.List} object.
*/
public void setPermissions(List permissions) {
this.permissions = permissions;
}
/**
* addPermission.
*
* @param permission a {@link net.sf.dynamicreports.jasper.constant.PdfPermission} object.
*/
public void addPermission(PdfPermission permission) {
this.permissions.add(permission);
}
/** {@inheritDoc} */
@Override
public PdfVersion getPdfVersion() {
return pdfVersion;
}
/**
* Setter for the field pdfVersion
.
*
* @param pdfVersion a {@link net.sf.dynamicreports.jasper.constant.PdfVersion} object.
*/
public void setPdfVersion(PdfVersion pdfVersion) {
this.pdfVersion = pdfVersion;
}
/** {@inheritDoc} */
@Override
public String getMetadataTitle() {
return metadataTitle;
}
/**
* Setter for the field metadataTitle
.
*
* @param metadataTitle a {@link java.lang.String} object.
*/
public void setMetadataTitle(String metadataTitle) {
this.metadataTitle = metadataTitle;
}
/** {@inheritDoc} */
@Override
public String getMetadataAuthor() {
return metadataAuthor;
}
/**
* Setter for the field metadataAuthor
.
*
* @param metadataAuthor a {@link java.lang.String} object.
*/
public void setMetadataAuthor(String metadataAuthor) {
this.metadataAuthor = metadataAuthor;
}
/** {@inheritDoc} */
@Override
public String getMetadataSubject() {
return metadataSubject;
}
/**
* Setter for the field metadataSubject
.
*
* @param metadataSubject a {@link java.lang.String} object.
*/
public void setMetadataSubject(String metadataSubject) {
this.metadataSubject = metadataSubject;
}
/** {@inheritDoc} */
@Override
public String getMetadataKeyWords() {
return metadataKeyWords;
}
/**
* Setter for the field metadataKeyWords
.
*
* @param metadataKeyWords a {@link java.lang.String} object.
*/
public void setMetadataKeyWords(String metadataKeyWords) {
this.metadataKeyWords = metadataKeyWords;
}
/** {@inheritDoc} */
@Override
public String getMetadataCreator() {
return metadataCreator;
}
/**
* Setter for the field metadataCreator
.
*
* @param metadataCreator a {@link java.lang.String} object.
*/
public void setMetadataCreator(String metadataCreator) {
this.metadataCreator = metadataCreator;
}
/** {@inheritDoc} */
@Override
public Boolean getForceSvgShapes() {
return forceSvgShapes;
}
/**
* Setter for the field forceSvgShapes
.
*
* @param forceSvgShapes a {@link java.lang.Boolean} object.
*/
public void setForceSvgShapes(Boolean forceSvgShapes) {
this.forceSvgShapes = forceSvgShapes;
}
/** {@inheritDoc} */
@Override
public String getPdfJavaScript() {
return pdfJavaScript;
}
/**
* Setter for the field pdfJavaScript
.
*
* @param pdfJavaScript a {@link java.lang.String} object.
*/
public void setPdfJavaScript(String pdfJavaScript) {
this.pdfJavaScript = pdfJavaScript;
}
/** {@inheritDoc} */
@Override
public Boolean getTagged() {
return tagged;
}
/**
* Setter for the field tagged
.
*
* @param tagged a {@link java.lang.Boolean} object.
*/
public void setTagged(Boolean tagged) {
this.tagged = tagged;
}
/** {@inheritDoc} */
@Override
public String getTagLanguage() {
return tagLanguage;
}
/**
* Setter for the field tagLanguage
.
*
* @param tagLanguage a {@link java.lang.String} object.
*/
public void setTagLanguage(String tagLanguage) {
this.tagLanguage = tagLanguage;
}
/** {@inheritDoc} */
@Override
public Boolean getCollapseMissingBookmarkLevels() {
return collapseMissingBookmarkLevels;
}
/**
* Setter for the field collapseMissingBookmarkLevels
.
*
* @param collapseMissingBookmarkLevels a {@link java.lang.Boolean} object.
*/
public void setCollapseMissingBookmarkLevels(Boolean collapseMissingBookmarkLevels) {
this.collapseMissingBookmarkLevels = collapseMissingBookmarkLevels;
}
/** {@inheritDoc} */
@Override
public Boolean getSizePageToContent() {
return sizePageToContent;
}
/**
* Setter for the field sizePageToContent
.
*
* @param sizePageToContent a {@link java.lang.Boolean} object.
*/
public void setSizePageToContent(Boolean sizePageToContent) {
this.sizePageToContent = sizePageToContent;
}
/** {@inheritDoc} */
@Override
public Boolean getIgnoreHyperLink() {
return ignoreHyperLink;
}
/**
* Setter for the field ignoreHyperLink
.
*
* @param ignoreHyperLink a {@link java.lang.Boolean} object.
*/
public void setIgnoreHyperLink(Boolean ignoreHyperLink) {
this.ignoreHyperLink = ignoreHyperLink;
}
/** {@inheritDoc} */
@Override
public Boolean getForceLineBreakPolicy() {
return forceLineBreakPolicy;
}
/**
* Setter for the field forceLineBreakPolicy
.
*
* @param forceLineBreakPolicy a {@link java.lang.Boolean} object.
*/
public void setForceLineBreakPolicy(Boolean forceLineBreakPolicy) {
this.forceLineBreakPolicy = forceLineBreakPolicy;
}
/** {@inheritDoc} */
@Override
public PdfPrintScaling getPrintScaling() {
return printScaling;
}
/**
* Setter for the field printScaling
.
*
* @param printScaling a {@link net.sf.dynamicreports.report.constant.PdfPrintScaling} object.
*/
public void setPrintScaling(PdfPrintScaling printScaling) {
this.printScaling = printScaling;
}
/** {@inheritDoc} */
@Override
public PdfaConformance getPdfaConformance() {
return pdfaConformance;
}
/**
* Setter for the field pdfaConformance
.
*
* @param pdfaConformance a {@link net.sf.dynamicreports.report.constant.PdfaConformance} object.
*/
public void setPdfaConformance(PdfaConformance pdfaConformance) {
this.pdfaConformance = pdfaConformance;
}
/** {@inheritDoc} */
@Override
public String getIccProfilePath() {
return iccProfilePath;
}
/**
* Setter for the field iccProfilePath
.
*
* @param iccProfilePath a {@link java.lang.String} object.
*/
public void setIccProfilePath(String iccProfilePath) {
this.iccProfilePath = iccProfilePath;
}
/** {@inheritDoc} */
@Override
public String getAllowedPermissionsHint() {
return allowedPermissionsHint;
}
/**
* Setter for the field allowedPermissionsHint
.
*
* @param allowedPermissionsHint a {@link java.lang.String} object.
*/
public void setAllowedPermissionsHint(String allowedPermissionsHint) {
this.allowedPermissionsHint = allowedPermissionsHint;
}
/** {@inheritDoc} */
@Override
public String getDeniedPermissionsHint() {
return deniedPermissionsHint;
}
/**
* Setter for the field deniedPermissionsHint
.
*
* @param deniedPermissionsHint a {@link java.lang.String} object.
*/
public void setDeniedPermissionsHint(String deniedPermissionsHint) {
this.deniedPermissionsHint = deniedPermissionsHint;
}
/** {@inheritDoc} */
@Override
public Boolean getDisplayMetadataTitle() {
return displayMetadataTitle;
}
/**
* Setter for the field displayMetadataTitle
.
*
* @param displayMetadataTitle a {@link java.lang.Boolean} object.
*/
public void setDisplayMetadataTitle(Boolean displayMetadataTitle) {
this.displayMetadataTitle = displayMetadataTitle;
}
}