be able to start with pdf a/3 files as well

This commit is contained in:
Jochen Stärk
2017-09-01 17:39:45 +02:00
parent 5d3ad6f920
commit 0292cfc2a9
13 changed files with 331 additions and 855 deletions

View File

@@ -59,7 +59,7 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
ZUGFeRDExporter zea1 = new ZUGFeRDExporterFromA1Factory().setProducer("My Application").setCreator("Test")
.loadFromPDFA1(SOURCE_PDF);
.load(SOURCE_PDF);
String ownZUGFeRDXML = "<rsm:CrossIndustryDocument xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15\" xmlns:rsm=\"urn:ferd:CrossIndustryDocument:invoice:1p0\">\n"
+ "<rsm:SpecifiedExchangedDocumentContext>\n" + "<ram:TestIndicator>\n"
+ "<udt:Indicator>false</udt:Indicator>\n" + "</ram:TestIndicator>\n"

View File

@@ -8,8 +8,6 @@ import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.xml.transform.TransformerException;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
@@ -405,12 +403,13 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
// the writing part
try(InputStream SOURCE_PDF =
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory()
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory()
.setProducer("My Application")
.setCreator(System.getProperty("user.name"))
.loadFromPDFA1(SOURCE_PDF)) {
.ignorePDFAErrors()
.load(SOURCE_PDF)) {
ze.PDFattachZugferdFile(this);
ze.export(TARGET_PDF);

View File

@@ -410,7 +410,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory()
.loadFromPDFA1(SOURCE_PDF)) {
.load(SOURCE_PDF)) {
ze.PDFattachZugferdFile(this);
ze.export(TARGET_PDF);
@@ -466,7 +466,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDF14.pdf");
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory()
.loadFromPDFA1(SOURCE_PDF)) {
.load(SOURCE_PDF)) {
ze.PDFattachZugferdFile(this);
ze.export(TARGET_PDF);