Package org.mustangproject.ZUGFeRD
Class ZUGFeRDExporterFromA1
- java.lang.Object
-
- org.mustangproject.ZUGFeRD.XRExporter
-
- org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3
-
- org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA1
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,IExporter,IZUGFeRDExporter
public class ZUGFeRDExporterFromA1 extends ZUGFeRDExporterFromA3
-
-
Field Summary
-
Fields inherited from class org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3
author, conformanceLevel, creator, creatorTool, DefaultZUGFeRDVersion, doc, documentPrepared, fileAttachments, ignorePDFAErrors, metadata, overwrite, producer, subject, title, xmp, XRechnungVersion, ZFVersion
-
-
Constructor Summary
Constructors Constructor Description ZUGFeRDExporterFromA1()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZUGFeRDExporterFromA1convertOnly()ZUGFeRDExporterFromA1disableAutoClose(boolean disableAutoClose)booleanensurePDFIsValid(jakarta.activation.DataSource dataSource)ZUGFeRDExporterFromA1load(byte[] pdfBinary)Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the metadata level, this will not e.g. convert graphics to JPG-2000)ZUGFeRDExporterFromA1load(java.io.InputStream pdfSource)Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the metadata level, this will not e.g. convert graphics to JPG-2000)ZUGFeRDExporterFromA1load(java.lang.String pdfFilename)Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the metadata level, this will not e.g. convert graphics to JPG-2000)ZUGFeRDExporterFromA1setConformanceLevel(PDFAConformanceLevel newLevel)All files are PDF/A-3, setConformance refers to the level conformance.ZUGFeRDExporterFromA1setCreator(java.lang.String creator)ZUGFeRDExporterFromA1setProducer(java.lang.String producer)ZUGFeRDExporterFromA1setProfile(java.lang.String profileName)ZUGFeRDExporterFromA1setProfile(Profile p)ZUGFeRDExporterFromA1setXML(byte[] zugferdData)Sets the ZUGFeRD XML data to be attached as a single byte array.ZUGFeRDExporterFromA1setZUGFeRDVersion(int version)ZUGFeRDExporterFromA1setZUGFeRDVersion(EStandard est, int version)-
Methods inherited from class org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3
addAdditionalFile, addSRGBOutputIntend, addStructureTreeRoot, addXMP, attachFile, attachFile, close, disableFacturX, export, export, getAdobePDFSchema, getDublinCoreSchema, getFilenameForVersion, getNamespaceForVersion, getPDFAIdentificationSchema, getPrefixForVersion, getProvider, getXmpBasicSchema, getXmpMetadata, ignorePDFAErrors, isAutoCloseDisabled, PDFAttachGenericFile, PDFAttachGenericFile, prepare, prepareDocument, serializeXmpMetadata, setAttachZUGFeRDHeaders, setCreatorTool, setFacturX, setMarked, setTransaction, setXMLProvider, setXRechnungSpecificVersion, writeAdobePDFSchema, writeDocumentInformation, writeDublinCoreSchema, writePDFAIdentificationSchema, writeXMLBasicSchema
-
-
-
-
Method Detail
-
setProfile
public ZUGFeRDExporterFromA1 setProfile(Profile p)
- Specified by:
setProfilein interfaceIZUGFeRDExporter- Overrides:
setProfilein classZUGFeRDExporterFromA3
-
setProfile
public ZUGFeRDExporterFromA1 setProfile(java.lang.String profileName)
- Overrides:
setProfilein classZUGFeRDExporterFromA3
-
ensurePDFIsValid
public boolean ensurePDFIsValid(jakarta.activation.DataSource dataSource) throws java.io.IOException- Specified by:
ensurePDFIsValidin interfaceIZUGFeRDExporter- Overrides:
ensurePDFIsValidin classZUGFeRDExporterFromA3- Throws:
java.io.IOException
-
load
public ZUGFeRDExporterFromA1 load(java.lang.String pdfFilename) throws java.io.IOException
Description copied from class:ZUGFeRDExporterFromA3Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the metadata level, this will not e.g. convert graphics to JPG-2000)- Specified by:
loadin interfaceIZUGFeRDExporter- Overrides:
loadin classZUGFeRDExporterFromA3- Parameters:
pdfFilename- filename of an PDF/A1 compliant document- Returns:
- the generated exporter
- Throws:
java.io.IOException- if anything is wrong with filename
-
load
public ZUGFeRDExporterFromA1 load(byte[] pdfBinary) throws java.io.IOException
Description copied from class:ZUGFeRDExporterFromA3Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the metadata level, this will not e.g. convert graphics to JPG-2000)- Specified by:
loadin interfaceIZUGFeRDExporter- Overrides:
loadin classZUGFeRDExporterFromA3- Parameters:
pdfBinary- binary of a PDF/A1 compliant document- Returns:
- the generated exporter
- Throws:
java.io.IOException- (should not happen at all)
-
load
public ZUGFeRDExporterFromA1 load(java.io.InputStream pdfSource) throws java.io.IOException
Description copied from class:ZUGFeRDExporterFromA3Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the metadata level, this will not e.g. convert graphics to JPG-2000)- Specified by:
loadin interfaceIZUGFeRDExporter- Overrides:
loadin classZUGFeRDExporterFromA3- Parameters:
pdfSource- source to read a PDF/A1 compliant document from- Returns:
- the generated ZUGFeRDExporter
- Throws:
java.io.IOException- if anything is wrong with inputstream
-
setCreator
public ZUGFeRDExporterFromA1 setCreator(java.lang.String creator)
- Specified by:
setCreatorin interfaceIZUGFeRDExporter- Overrides:
setCreatorin classZUGFeRDExporterFromA3
-
setConformanceLevel
public ZUGFeRDExporterFromA1 setConformanceLevel(PDFAConformanceLevel newLevel)
Description copied from class:ZUGFeRDExporterFromA3All files are PDF/A-3, setConformance refers to the level conformance.PDF/A-3 has three coformance levels, called "A", "U" and "B".
PDF/A-3-B where B means only visually preservable, U -standard for Mustang- means visually and unicode preservable and A means full compliance, i.e. visually, unicode and structurally preservable and tagged PDF, i.e. useful metainformation for blind people.
Feel free to pass "A" as new level if you know what you are doing :-)
- Specified by:
setConformanceLevelin interfaceIZUGFeRDExporter- Overrides:
setConformanceLevelin classZUGFeRDExporterFromA3
-
setProducer
public ZUGFeRDExporterFromA1 setProducer(java.lang.String producer)
- Specified by:
setProducerin interfaceIZUGFeRDExporter- Overrides:
setProducerin classZUGFeRDExporterFromA3
-
setZUGFeRDVersion
public ZUGFeRDExporterFromA1 setZUGFeRDVersion(EStandard est, int version)
- Overrides:
setZUGFeRDVersionin classZUGFeRDExporterFromA3
-
setZUGFeRDVersion
public ZUGFeRDExporterFromA1 setZUGFeRDVersion(int version)
- Specified by:
setZUGFeRDVersionin interfaceIZUGFeRDExporter- Overrides:
setZUGFeRDVersionin classZUGFeRDExporterFromA3
-
setXML
public ZUGFeRDExporterFromA1 setXML(byte[] zugferdData) throws java.io.IOException
Description copied from class:ZUGFeRDExporterFromA3Sets the ZUGFeRD XML data to be attached as a single byte array. This is useful for use-cases where the XML has already been produced by some external API or component.- Specified by:
setXMLin interfaceIZUGFeRDExporter- Overrides:
setXMLin classZUGFeRDExporterFromA3- Parameters:
zugferdData- XML data to be set as a byte array (XML file in raw form).- Throws:
java.io.IOException- (should not happen)
-
disableAutoClose
public ZUGFeRDExporterFromA1 disableAutoClose(boolean disableAutoClose)
- Specified by:
disableAutoClosein interfaceIZUGFeRDExporter- Overrides:
disableAutoClosein classZUGFeRDExporterFromA3- Parameters:
disableAutoClose- prevent PDF file from being closed after adding ZF
-
convertOnly
public ZUGFeRDExporterFromA1 convertOnly()
-
-