Merge pull request #70 from InspireTechnologies/issue-38
Added setCreatorTool (implements #38)
This commit is contained in:
@@ -100,8 +100,12 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
protected PDMetadata metadata = null;
|
protected PDMetadata metadata = null;
|
||||||
protected PDFAIdentificationSchema pdfaid = null;
|
protected PDFAIdentificationSchema pdfaid = null;
|
||||||
protected XMPMetadata xmp = null;
|
protected XMPMetadata xmp = null;
|
||||||
|
/** Producer attribute for PDF */
|
||||||
protected String producer = "mustangproject";
|
protected String producer = "mustangproject";
|
||||||
|
/** Author/Creator attribute for PDF for PDF */
|
||||||
protected String creator = "mustangproject";
|
protected String creator = "mustangproject";
|
||||||
|
/** CreatorTool */
|
||||||
|
protected String creatorTool = "mustangproject";
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private boolean ignoreA1Errors;
|
private boolean ignoreA1Errors;
|
||||||
@@ -558,7 +562,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
|
|
||||||
XMPBasicSchema xsb = xmp.createAndAddXMPBasicSchema();
|
XMPBasicSchema xsb = xmp.createAndAddXMPBasicSchema();
|
||||||
|
|
||||||
xsb.setCreatorTool(creator);
|
xsb.setCreatorTool(creatorTool);
|
||||||
xsb.setCreateDate(GregorianCalendar.getInstance());
|
xsb.setCreateDate(GregorianCalendar.getInstance());
|
||||||
// PDDocumentInformation pdi=doc.getDocumentInformation();
|
// PDDocumentInformation pdi=doc.getDocumentInformation();
|
||||||
PDDocumentInformation pdi = new PDDocumentInformation();
|
PDDocumentInformation pdi = new PDDocumentInformation();
|
||||||
@@ -619,6 +623,13 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
public void setCreator(String creator) {
|
public void setCreator(String creator) {
|
||||||
this.creator = creator;
|
this.creator = creator;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* the CreatorTool attribute for the PDF
|
||||||
|
* @param creator
|
||||||
|
*/
|
||||||
|
protected void setCreatorTool(String creatorTool) {
|
||||||
|
this.creatorTool = creatorTool;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the authoring software (use factory method instead)
|
* the authoring software (use factory method instead)
|
||||||
|
|||||||
@@ -36,8 +36,12 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
protected boolean ignorePDFAErrors = false;
|
protected boolean ignorePDFAErrors = false;
|
||||||
protected ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
protected ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
||||||
protected PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
protected PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
||||||
|
/** Producer (attribute for PDF */
|
||||||
protected String producer = "mustangproject";
|
protected String producer = "mustangproject";
|
||||||
|
/** Human creator (attribute for PDF) */
|
||||||
protected String creator = "mustangproject";
|
protected String creator = "mustangproject";
|
||||||
|
/** Creator tool (attribute for PDF) */
|
||||||
|
protected String creatorTool = null;
|
||||||
|
|
||||||
protected int ZFVersion=ZUGFeRDExporter.DefaultZUGFeRDVersion;
|
protected int ZFVersion=ZUGFeRDExporter.DefaultZUGFeRDVersion;
|
||||||
protected boolean ensurePDFisUpgraded=false;
|
protected boolean ensurePDFisUpgraded=false;
|
||||||
@@ -58,6 +62,8 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
zugFeRDExporter.setZUGFeRDVersion(ZFVersion);
|
zugFeRDExporter.setZUGFeRDVersion(ZFVersion);
|
||||||
zugFeRDExporter.setZUGFeRDConformanceLevel(zugferdConformanceLevel);
|
zugFeRDExporter.setZUGFeRDConformanceLevel(zugferdConformanceLevel);
|
||||||
zugFeRDExporter.setCreator(creator);
|
zugFeRDExporter.setCreator(creator);
|
||||||
|
// Use creator as default for compatibility
|
||||||
|
zugFeRDExporter.setCreatorTool(creatorTool != null ? creatorTool : creator);
|
||||||
zugFeRDExporter.setProducer(producer);
|
zugFeRDExporter.setProducer(producer);
|
||||||
zugFeRDExporter.setAttachZUGFeRDHeaders(attachZUGFeRDHeaders);
|
zugFeRDExporter.setAttachZUGFeRDHeaders(attachZUGFeRDHeaders);
|
||||||
zugFeRDExporter.setPDFA3(ensurePDFisUpgraded);
|
zugFeRDExporter.setPDFA3(ensurePDFisUpgraded);
|
||||||
@@ -190,6 +196,11 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
this.creator = creator;
|
this.creator = creator;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IExporterFactory setCreatorTool(String creatorTool) {
|
||||||
|
this.creatorTool = creatorTool;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public IExporterFactory setProducer(String producer) {
|
public IExporterFactory setProducer(String producer) {
|
||||||
this.producer = producer;
|
this.producer = producer;
|
||||||
|
|||||||
Reference in New Issue
Block a user