This commit is contained in:
jstaerk
2024-08-21 06:50:36 +02:00
parent 23244cffa6
commit d0f49749e0
2 changed files with 51 additions and 53 deletions

View File

@@ -1,5 +1,6 @@
- #420
- #441
- #431 support reasoncodes
- Enhance Charges/Allowances with reasonCode. #432
- Fix build warnings from editing and building. #415
- ZUGFeRDVisualizer.toPDF(): generate PDF/A-3b. #400
@@ -7,8 +8,9 @@
and XML (zii.getFileAttachmentsXML)
- #436 and #370. (langfr)
- refactor(ZUGFeRDVisualizer): improve PDF visualization performance #438
- trying to default product on empty description
- #452
-
2.12.0
=======
2024-07-20

View File

@@ -85,6 +85,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
this.ignorePDFAErrors = true;
return this;
}
protected PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
protected ArrayList<FileAttachment> fileAttachments = new ArrayList<>();
@@ -223,20 +224,19 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
* @return the filename of the file to be embedded
*/
public String getFilenameForVersion(int ver, Profile profile) {
if (profile.getName().equals("XRECHNUNG")) {
return "xrechnung.xml";
}
if (isFacturX) {
return "factur-x.xml";
} else {
if (ver == 1) {
return "ZUGFeRD-invoice.xml";
} else {
if (profile.getName().equals("XRECHNUNG")) {
return "xrechnung.xml";
} else {
return "zugferd-invoice.xml";
}
}
}
}
/**
@@ -260,8 +260,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
*
* @param XRechnungVersion the XRechnung version
*/
public void setXRechnungSpecificVersion(String XRechnungVersion)
{
public void setXRechnungSpecificVersion(String XRechnungVersion) {
this.XRechnungVersion = XRechnungVersion;
}
@@ -538,8 +537,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
// The XRechnung version may be settable from outside.
if ((this.XRechnungVersion != null) && (this.profile != null) &&
this.profile.getName().equalsIgnoreCase(Profiles.getByName("XRECHNUNG").getName()))
{
this.profile.getName().equalsIgnoreCase(Profiles.getByName("XRECHNUNG").getName())) {
metaDataVersion = this.XRechnungVersion;
}
@@ -557,8 +555,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
}
private void removeCidSet(PDDocument doc)
throws IOException
{
throws IOException {
// https://github.com/ZUGFeRD/mustangproject/issues/249
COSName cidSet = COSName.getPDFName("CIDSet");
@@ -651,11 +648,9 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
// ZUGFeRD 2.1.1 Technical Supplement | Part A | 2.2.2. Data Relationship
// See documentation ZUGFeRD211_EN/Documentation/ZUGFeRD-2.1.1 - Specification_TA_Part-A.pdf
// https://www.ferd-net.de/standards/zugferd-2.1.1/index.html
if ((this.profile != null) && (ZFVersion >= 2))
{
if ((this.profile != null) && (ZFVersion >= 2)) {
if (this.profile.getName().equalsIgnoreCase(Profiles.getByName("MINIMUM").getName()) ||
this.profile.getName().equalsIgnoreCase(Profiles.getByName("BASICWL").getName()))
{
this.profile.getName().equalsIgnoreCase(Profiles.getByName("BASICWL").getName())) {
relationship = "Data";
}
}
@@ -674,12 +669,12 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
/**
* Reads the XMPMetadata from the PDDocument, if it exists.
* Otherwise creates XMPMetadata.
*
* @return the finished XMPMetadata object
* @throws IOException when e.g. XmpParsingException
*/
protected XMPMetadata getXmpMetadata()
throws IOException
{
throws IOException {
PDMetadata meta = doc.getDocumentCatalog().getMetadata();
if ((meta != null) && (meta.getLength() > 0)) {
try {
@@ -701,6 +696,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
/**
* Sets the producer if the overwrite flag is set or the producer is not already set.
* Sets the PDFVersion to 1.4 if the field is empty.
*
* @param xmp the metadata as XML
*/
protected void writeAdobePDFSchema(XMPMetadata xmp) {
@@ -823,11 +819,11 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
/**
* Adds an OutputIntent and the sRGB color profile if no OutputIntent exist
*
* @throws IOException if the ICC file cannot be read or attached to doc
*/
protected void addSRGBOutputIntend()
throws IOException
{
throws IOException {
if (!doc.getDocumentCatalog().getOutputIntents().isEmpty()) {
return;
}