corrected Producer and added Producer unit test

This commit is contained in:
Jochen Stärk
2017-08-28 18:17:11 +02:00
parent fc9c05c54c
commit 127435cf04
3 changed files with 14 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
@@ -298,6 +299,10 @@ public class ZUGFeRDExporter implements Closeable {
public void export(String ZUGFeRDfilename) throws IOException {
doc.save(ZUGFeRDfilename);
}
public void export(OutputStream output) throws IOException {
doc.save(output);
}
/**
* Embeds an external file (generic - any type allowed) in the PDF.

View File

@@ -88,7 +88,7 @@ public class ZUGFeRDExporterFromA1Factory {
}
private void makePDFA3compliant(PDDocument doc) throws IOException {
String fullProducer = producer + " (via mustangproject.org " + Version.getVersion() + ")";
String fullProducer = producer + " (via mustangproject.org "+org.mustangproject.ZUGFeRD.Version.VERSION+")";
PDDocumentCatalog cat = doc.getDocumentCatalog();
PDMetadata metadata = new PDMetadata(doc);