be able to start with pdf a/3 files as well
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user