Skip to content

Commit 4000178

Browse files
committed
added metadata flavor for ZUGFeRD 2.0
1 parent e461b81 commit 4000178

File tree

2 files changed

+99
-1
lines changed

2 files changed

+99
-1
lines changed

ZUGFeRD.PDF/InvoiceDescriptorPdfSaver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private static Stream _CreateFacturXStream(Stream pdfStream, Stream xmlStream, Z
221221
switch (version)
222222
{
223223
case ZUGFeRDVersion.Version1: metadataResource = "s2industries.ZUGFeRD.PDF.Resources.PdfMetadataTemplate-1.0.xml"; break;
224-
case ZUGFeRDVersion.Version20: metadataResource = "s2industries.ZUGFeRD.PDF.Resources.PdfMetadataTemplate-1.0.xml"; break;
224+
case ZUGFeRDVersion.Version20: metadataResource = "s2industries.ZUGFeRD.PDF.Resources.PdfMetadataTemplate-2.0.xml"; break;
225225
case ZUGFeRDVersion.Version23: metadataResource = "s2industries.ZUGFeRD.PDF.Resources.PdfMetadataTemplate-2.3.xml"; break;
226226
}
227227

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?>
2+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
3+
4+
<rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" rdf:about="">
5+
<pdfaid:part>3</pdfaid:part>
6+
<pdfaid:conformance>A</pdfaid:conformance>
7+
</rdf:Description>
8+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
9+
<dc:title>
10+
<rdf:Alt>
11+
<rdf:li xml:lang="x-default">{{DocumentTitle}}</rdf:li>
12+
</rdf:Alt>
13+
</dc:title>
14+
<dc:creator>
15+
<rdf:Seq>
16+
<rdf:li>S2 Industries</rdf:li>
17+
</rdf:Seq>
18+
</dc:creator>
19+
<dc:description>
20+
<rdf:Alt>
21+
<rdf:li xml:lang="x-default">{{DocumentDescription}}</rdf:li>
22+
</rdf:Alt>
23+
</dc:description>
24+
</rdf:Description>
25+
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
26+
<pdf:Producer>S2 Industries</pdf:Producer>
27+
</rdf:Description>
28+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
29+
<xmp:CreatorTool>s2industries.ZUGFeRD.PDF</xmp:CreatorTool>
30+
<xmp:CreateDate>{{CreationDate}}</xmp:CreateDate>
31+
<xmp:ModifyDate>{{ModificationDate}}</xmp:ModifyDate>
32+
</rdf:Description>
33+
34+
<!-- XMP extension schema container for the ZUGFeRD schema -->
35+
<rdf:Description rdf:about=""
36+
xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
37+
xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
38+
xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
39+
40+
<!-- Container for all embedded extension schema descriptions -->
41+
<pdfaExtension:schemas>
42+
<rdf:Bag>
43+
<rdf:li rdf:parseType="Resource">
44+
<!-- Optional description of schema -->
45+
<pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
46+
<!-- Schema namespace URI -->
47+
<pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
48+
<!-- Preferred schema namespace prefix -->
49+
<pdfaSchema:prefix>zf</pdfaSchema:prefix>
50+
51+
<!-- Description of schema properties -->
52+
<pdfaSchema:property>
53+
<rdf:Seq>
54+
<rdf:li rdf:parseType="Resource">
55+
<!-- DocumentFileName: Name of the embedded file; must be equal to the value of the /F tag in the /EF structure -->
56+
<pdfaProperty:name>DocumentFileName</pdfaProperty:name>
57+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
58+
<pdfaProperty:category>external</pdfaProperty:category>
59+
<pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
60+
</rdf:li>
61+
62+
<rdf:li rdf:parseType="Resource">
63+
<!-- DocumentType: INVOICE -->
64+
<pdfaProperty:name>DocumentType</pdfaProperty:name>
65+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
66+
<pdfaProperty:category>external</pdfaProperty:category>
67+
<pdfaProperty:description>INVOICE</pdfaProperty:description>
68+
</rdf:li>
69+
70+
<rdf:li rdf:parseType="Resource">
71+
<!-- Version: The actual version of the ZUGFeRD XML schema -->
72+
<pdfaProperty:name>Version</pdfaProperty:name>
73+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
74+
<pdfaProperty:category>external</pdfaProperty:category>
75+
<pdfaProperty:description>The actual version of the ZUGFeRD XML schema</pdfaProperty:description>
76+
</rdf:li>
77+
78+
<rdf:li rdf:parseType="Resource">
79+
<!-- ConformanceLevel: The actual conformance level (resp. profile) of the embedded ZUGFeRD XML data, e.g. BASIC, COMFORT, EXTENDED -->
80+
<pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
81+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
82+
<pdfaProperty:category>external</pdfaProperty:category>
83+
<pdfaProperty:description>The conformance level of the embedded ZUGFeRD data</pdfaProperty:description>
84+
</rdf:li>
85+
</rdf:Seq>
86+
</pdfaSchema:property>
87+
</rdf:li>
88+
</rdf:Bag>
89+
</pdfaExtension:schemas>
90+
</rdf:Description>
91+
<rdf:Description rdf:about="" xmlns:zf="urn:zugferd:pdfa:CrossIndustryDocument:invoice:2p0#">
92+
<zf:DocumentType>INVOICE</zf:DocumentType>
93+
<zf:DocumentFileName>{{InvoiceFilename}}</zf:DocumentFileName>
94+
<zf:Version>{{Version}}</zf:Version>
95+
<zf:ConformanceLevel>{{ConformanceLevel}}</zf:ConformanceLevel>
96+
</rdf:Description>
97+
</rdf:RDF>
98+
<?xpacket end="w"?>

0 commit comments

Comments
 (0)