Standardmäßig ZF1 exportieren
This commit is contained in:
@@ -78,13 +78,13 @@ public class XMPSchemaPDFAExtensions extends PDFAExtensionSchema {
|
|||||||
|
|
||||||
public XMPSchemaPDFAExtensions(XMPMetadata metadata) {
|
public XMPSchemaPDFAExtensions(XMPMetadata metadata) {
|
||||||
super(metadata);
|
super(metadata);
|
||||||
setZUGFeRDVersion(2);
|
setZUGFeRDVersion(ZUGFeRDExporter.DefaultZUGFeRDVersion);
|
||||||
attachExtensions(metadata, true);
|
attachExtensions(metadata, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public XMPSchemaPDFAExtensions(XMPMetadata metadata, boolean withZF) {
|
public XMPSchemaPDFAExtensions(XMPMetadata metadata, boolean withZF) {
|
||||||
super(metadata);
|
super(metadata);
|
||||||
setZUGFeRDVersion(2);
|
setZUGFeRDVersion(ZUGFeRDExporter.DefaultZUGFeRDVersion);
|
||||||
attachExtensions(metadata, withZF);
|
attachExtensions(metadata, withZF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class ZUGFeRDExporter implements Closeable {
|
public class ZUGFeRDExporter implements Closeable {
|
||||||
|
|
||||||
|
public static final int DefaultZUGFeRDVersion = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To use the ZUGFeRD exporter, implement IZUGFeRDExportableTransaction in
|
* To use the ZUGFeRD exporter, implement IZUGFeRDExportableTransaction in
|
||||||
* yourTransaction (which will require you to implement Product, Item and
|
* yourTransaction (which will require you to implement Product, Item and
|
||||||
@@ -128,7 +130,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
setZUGFeRDVersion(2);
|
setZUGFeRDVersion(DefaultZUGFeRDVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
protected PDMetadata metadata = null;
|
protected PDMetadata metadata = null;
|
||||||
protected PDFAIdentificationSchema pdfaid = null;
|
protected PDFAIdentificationSchema pdfaid = null;
|
||||||
protected XMPMetadata xmp = null;
|
protected XMPMetadata xmp = null;
|
||||||
protected int ZFVersion=2;
|
protected int ZFVersion=ZUGFeRDExporter.DefaultZUGFeRDVersion;
|
||||||
/**
|
/**
|
||||||
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
|
* 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)
|
* metadata level, this will not e.g. convert graphics to JPG-2000)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
* importer test (which is probably redundant) --> as only Name Ascending is
|
* importer test (which is probably redundant) --> as only Name Ascending is
|
||||||
* supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
* supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
||||||
*/
|
*/
|
||||||
public void testZExport() throws Exception {
|
public void testCustomExport() throws Exception {
|
||||||
|
|
||||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505custom.pdf";
|
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505custom.pdf";
|
||||||
// the writing part
|
// the writing part
|
||||||
@@ -221,7 +221,6 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
assertEquals(iban, "DE88 2008 0000 0970 3757 00");
|
||||||
assertEquals(holder, "Bei Spiel GmbH");
|
assertEquals(holder, "Bei Spiel GmbH");
|
||||||
assertEquals(ref, "RE-20170509/505");
|
assertEquals(ref, "RE-20170509/505");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,8 +396,7 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
* It would not make sense to have it run before the less complex importer test (which is probably redundant)
|
* It would not make sense to have it run before the less complex importer test (which is probably redundant)
|
||||||
* --> as only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
* --> as only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
||||||
*/
|
*/
|
||||||
public void testZExport() throws Exception
|
public void testEdgeExport() throws Exception {
|
||||||
{
|
|
||||||
|
|
||||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505newEdge.pdf";
|
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505newEdge.pdf";
|
||||||
// the writing part
|
// the writing part
|
||||||
|
|||||||
Reference in New Issue
Block a user