ZugferdConformanceLevel Enum
Lists values that specify a ZUGFeRD conformance level.
Declaration
public enum ZugferdConformanceLevel extends Enum<ZugferdConformanceLevel> implements IIntEnum
Members
| Name | Description |
|---|---|
BASIC
|
Does not include additional metadata or document structure. |
BASIC_WL
|
Includes additional metadata that improves invoice readability. |
COMFORT
|
Includes additional metadata and document structure that improve readability and usability. |
EN_16931
|
Complies with the EN 16931 electronic invoicing standard. |
EXTENDED
|
Includes additional metadata and document structure that improve readability, usability, and interoperability. |
MINIMUM
|
Includes the minimum required metadata that identifies the invoice. |
NONE
|
No conformance level is specified. |
X_RECHNUNG
|
Complies with the XRechnung electronic invoicing standard in Germany. |
fromValue(int value)
|
Returns the enum item with the specified integer value. |
getName()
|
Returns the enum item name. |
getValue()
|
Returns the integer value. |
toString()
|
Returns the string representation. |
valueOf(String name)
|
Returns the enum constant with the specified name. |
values()
|
Returns available constants. |
Remarks
The following code snippet attaches a ZUGFeRD invoice XML file to an existing PDF document:
import com.devexpress.docs.pdf.*;
import java.io.*;
import java.nio.file.*;
public class Main {
public static void main(String[] args) throws Exception {
try (InputStream stream = Files.newInputStream( Path.of("Invoice.pdf"));
PdfDocument pdfDocument = new PdfDocument(stream)) {
// Load the invoice XML data.
byte[] invoiceData = Files.readAllBytes(Path.of("ZUGFeRD-invoice.xml"));
// Attach the XML invoice and specify the ZUGFeRD version and conformance level.
pdfDocument.attachZugferdInvoice(
invoiceData,
ZugferdVersion.VERSION_2_3_2,
ZugferdConformanceLevel.BASIC);
// Save the PDF document with the embedded ZUGFeRD invoice.
try (OutputStream outputStream =
Files.newOutputStream( Path.of("Invoice_ZUGFeRD.pdf"))){
pdfDocument.save(outputStream);
}
}
}
}
Refer to the following help topic for additional information: Generate ZUGFeRD-Compliant PDF Invoices.