]> git.ipfire.org Git - thirdparty/python-drafthorse.git/commitdiff
Fix PDF embedding
authorRaphael Michel <michel@rami.io>
Wed, 3 Aug 2022 12:44:56 +0000 (14:44 +0200)
committerRaphael Michel <michel@rami.io>
Wed, 3 Aug 2022 12:44:56 +0000 (14:44 +0200)
drafthorse/pdf.py
drafthorse/schema/ZUGFeRD2p2_extension_schema.xmp [new file with mode: 0644]
drafthorse/schema/ZUGFeRD2p2_extension_schema_BASIC.xmp [deleted file]
drafthorse/schema/ZUGFeRD2p2_extension_schema_EN16931.xmp [deleted file]
drafthorse/schema/ZUGFeRD2p2_extension_schema_EXTENDED.xmp [deleted file]
drafthorse/schema/ZUGFeRD2p2_extension_schema_MINIMUM.xmp [deleted file]

index a8459ff44db7bac88474fe52193579d668c9acf5..f70c8ae743bcb39b72a02d3b4d8169acba7e86af 100644 (file)
@@ -47,8 +47,6 @@ def attach_xml(original_pdf, xml_data, level="BASIC"):
 
     reader = PdfReader(BytesIO(original_pdf))
     output = PdfWriter()
-    # for page in reader.pages:
-    #    output.addPage(page)
 
     output._header = "%PDF-1.6\r\n%\xc7\xec\x8f\xa2".encode()
     output.append_pages_from_reader(reader)
@@ -105,7 +103,7 @@ def _prepare_pdf_metadata_xml(level, pdf_metadata):
     nsmap_pdf = {"pdf": "http://ns.adobe.com/pdf/1.3/"}
     nsmap_xmp = {"xmp": "http://ns.adobe.com/xap/1.0/"}
     nsmap_pdfaid = {"pdfaid": "http://www.aiim.org/pdfa/ns/id/"}
-    nsmap_zf = {"zf": "urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#"}
+    nsmap_zf = {"zf": "urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#"}
     ns_x = "{%s}" % nsmap_x["x"]
     ns_dc = "{%s}" % nsmap_dc["dc"]
     ns_rdf = "{%s}" % nsmap_rdf["rdf"]
@@ -158,7 +156,7 @@ def _prepare_pdf_metadata_xml(level, pdf_metadata):
     fx_doc_filename = etree.SubElement(
         zugferd_desc, ns_zf + "DocumentFileName", nsmap=nsmap_zf
     )
-    fx_doc_filename.text = "{}.xml".format(level)
+    fx_doc_filename.text = "factur-x.xml"
     fx_doc_version = etree.SubElement(zugferd_desc, ns_zf + "Version", nsmap=nsmap_zf)
     fx_doc_version.text = "1.0"
     fx_conformance_level = etree.SubElement(
@@ -167,7 +165,7 @@ def _prepare_pdf_metadata_xml(level, pdf_metadata):
     fx_conformance_level.text = level
 
     xmp_file = os.path.join(
-        os.path.dirname(__file__), "schema", "ZUGFeRD2p2_extension_schema_{}.xmp".format(level)
+        os.path.dirname(__file__), "schema", "ZUGFeRD2p2_extension_schema.xmp".format(level)
     )
     # Reason for defining a parser below:
     # http://lxml.de/FAQ.html#why-doesn-t-the-pretty-print-option-reformat-my-xml-output
@@ -219,10 +217,10 @@ def _facturx_update_metadata_add_attachment(
         {NameObject("/F"): file_entry_obj, NameObject("/UF"): file_entry_obj}
     )
 
-    fname_obj = createStringObject(facturx_level + ".xml")
+    fname_obj = createStringObject("factur-x.xml")
     filespec_dict = DictionaryObject(
         {
-            NameObject("/AFRelationship"): NameObject("/Alternative"),
+            NameObject("/AFRelationship"): NameObject("/Data" if facturx_level in ("BASIC-WL", "MINIMUM") else "/Alternative"),
             NameObject("/Desc"): createStringObject(
                 "Invoice metadata conforming to ZUGFeRD standard (http://www.ferd-net.de/front_content.php?idcat=231&lang=4)"
             ),
diff --git a/drafthorse/schema/ZUGFeRD2p2_extension_schema.xmp b/drafthorse/schema/ZUGFeRD2p2_extension_schema.xmp
new file mode 100644 (file)
index 0000000..8b6d1ae
--- /dev/null
@@ -0,0 +1,68 @@
+<!--
+(c) PDFlib GmbH 2019
+
+Sample Factur-X XMP with the required PDF/A extension schema description
+for the XMP properties of the Factur-X schema and the actual Factur-X properties.
+
+Schema name: Factur-X PDFA Extension Schema
+Preferred schema namespace prefix: fx
+Schema namespace URI: urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#
+
+Based on the Factur-X specification published at http://fnfe-mpe.org/factur-x/factur-x_en/
+-->
+
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+
+  <!-- The actual Factur-X properties; adjust if required -->
+  <rdf:Description rdf:about="" xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#">
+        <fx:ConformanceLevel>BASIC</fx:ConformanceLevel>
+        <fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
+        <fx:DocumentType>INVOICE</fx:DocumentType>
+        <fx:Version>1.0</fx:Version>
+  </rdf:Description>
+
+  <!-- PDF/A extension schema description for the Factur-X schema.  -->
+  <rdf:Description rdf:about=""
+               xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
+               xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
+               xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
+
+        <pdfaExtension:schemas>
+               <rdf:Bag>
+                  <rdf:li rdf:parseType="Resource">
+                         <pdfaSchema:schema>Factur-X PDF/A Extension Schema</pdfaSchema:schema>
+                         <pdfaSchema:namespaceURI>urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
+                         <pdfaSchema:prefix>fx</pdfaSchema:prefix>
+                         <pdfaSchema:property>
+                                <rdf:Seq>
+                                       <rdf:li rdf:parseType="Resource">
+                                          <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
+                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+                                          <pdfaProperty:category>external</pdfaProperty:category>
+                                          <pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
+                                       </rdf:li>
+                                       <rdf:li rdf:parseType="Resource">
+                                          <pdfaProperty:name>DocumentType</pdfaProperty:name>
+                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+                                          <pdfaProperty:category>external</pdfaProperty:category>
+                                          <pdfaProperty:description>INVOICE</pdfaProperty:description>
+                                       </rdf:li>
+                                       <rdf:li rdf:parseType="Resource">
+                                          <pdfaProperty:name>Version</pdfaProperty:name>
+                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+                                          <pdfaProperty:category>external</pdfaProperty:category>
+                                          <pdfaProperty:description>The actual version of the Factur-X XML schema</pdfaProperty:description>
+                                       </rdf:li>
+                                       <rdf:li rdf:parseType="Resource">
+                                          <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
+                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+                                          <pdfaProperty:category>external</pdfaProperty:category>
+                                          <pdfaProperty:description>The conformance level of the embedded Factur-X data</pdfaProperty:description>
+                                       </rdf:li>
+                                </rdf:Seq>
+                         </pdfaSchema:property>
+                  </rdf:li>
+               </rdf:Bag>
+        </pdfaExtension:schemas>
+  </rdf:Description>
+</rdf:RDF>
\ No newline at end of file
diff --git a/drafthorse/schema/ZUGFeRD2p2_extension_schema_BASIC.xmp b/drafthorse/schema/ZUGFeRD2p2_extension_schema_BASIC.xmp
deleted file mode 100644 (file)
index 97b52b5..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-PDFlib GmbH 2013-2014
-Sample ZUGFeRD XMP with the required PDF/A extension schema description
-for the XMP properties of the ZUGFeRD schema and the actual ZUGFeRD properties.
-Schema name: ZUGFeRD Schema
-Preferred schema namespace prefix: zf
-Schema namespace URI: urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#
-Notes on the ZUGFeRD schema namespace URI:
-- The use of mixed upper/lowercase in "CrossIndustryDocument" conforms to
-  the ZUGFeRD 1.0 specification. The PDF samples distributed with the
-  ZUGFeRD 1.0 info package use all-lowercase spelling "crossindustrydocument"
-  which is not correct since it violates the ZUGFeRD specification.
-- The required trailing "#" character is missing in the comment in the
-  ZUGFeRD 1.0 extension schema description which is included in the ZUGFeRD
-  specification, but it is correctly present in the actual XMP.
-Based on the ZUGFeRD 1.0 package (published 2014-06 on www.ferd-net.de)
-which is Copyright AWV e.V. 2014.
-2014-07-01 (based on ZUGFeRD 1.0)
-Adjustments for ZUGFeRD 1.0:
-- updated header comments
-- switched to new namespace URI
-- adjusted property descriptions in the extension schema descriptions
-2013-06-19 (based on ZUGFeRD RC)
-Added a trailing hash character "#" to the "zf" namespace name as required
-by the XMP 2005 specification which is referenced in PDF/A-2 and PDF/A-3.
-Without this change Acrobat XI Preflight validation for PDF/A-3 complains
-"Extension schema present but not valid"
-2013-06-19
-Singled out the zf properties into a separate rdf:Description node to work
-around bug #4433 in PDFlib 9.0.0 which has been fixed in PDFlib 9.0.1.
-NOTE: the zf namespace has been altered to fx since ZUGfERD v2.1
--->
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-  <!-- The actual ZUGFeRD properties; adjust if required -->
-  <rdf:Description rdf:about="" xmlns:fx="urn:ferd:pdfa:CrossIndustryDocument:invoice:2p2#">
-        <fx:ConformanceLevel>BASIC</fx:ConformanceLevel>
-        <fx:DocumentFileName>BASIC.xml</fx:DocumentFileName>
-        <fx:DocumentType>INVOICE</fx:DocumentType>
-        <fx:Version>1.0</fx:Version>
-  </rdf:Description>
-
-  <!-- PDF/A extension schema description for the ZUGFeRD schema.
-     It is crucial for PDF/A-3 conformance. Don't touch! -->
-  <rdf:Description rdf:about=""
-               xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
-               xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
-               xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
-
-        <pdfaExtension:schemas>
-               <rdf:Bag>
-                  <rdf:li rdf:parseType="Resource">
-                         <pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
-                         <pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
-                         <pdfaSchema:prefix>fx</pdfaSchema:prefix>
-                         <pdfaSchema:property>
-                                <rdf:Seq>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentType</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>INVOICE</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>Version</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The actual version of the ZUGFeRD XML schema</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The conformance level of the embedded ZUGFeRD data</pdfaProperty:description>
-                                       </rdf:li>
-                                </rdf:Seq>
-                         </pdfaSchema:property>
-                  </rdf:li>
-               </rdf:Bag>
-        </pdfaExtension:schemas>
-  </rdf:Description>
-</rdf:RDF>
diff --git a/drafthorse/schema/ZUGFeRD2p2_extension_schema_EN16931.xmp b/drafthorse/schema/ZUGFeRD2p2_extension_schema_EN16931.xmp
deleted file mode 100644 (file)
index 4ecf202..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-PDFlib GmbH 2013-2014
-Sample ZUGFeRD XMP with the required PDF/A extension schema description
-for the XMP properties of the ZUGFeRD schema and the actual ZUGFeRD properties.
-Schema name: ZUGFeRD Schema
-Preferred schema namespace prefix: zf
-Schema namespace URI: urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#
-Notes on the ZUGFeRD schema namespace URI:
-- The use of mixed upper/lowercase in "CrossIndustryDocument" conforms to
-  the ZUGFeRD 1.0 specification. The PDF samples distributed with the
-  ZUGFeRD 1.0 info package use all-lowercase spelling "crossindustrydocument"
-  which is not correct since it violates the ZUGFeRD specification.
-- The required trailing "#" character is missing in the comment in the
-  ZUGFeRD 1.0 extension schema description which is included in the ZUGFeRD
-  specification, but it is correctly present in the actual XMP.
-Based on the ZUGFeRD 1.0 package (published 2014-06 on www.ferd-net.de)
-which is Copyright AWV e.V. 2014.
-2014-07-01 (based on ZUGFeRD 1.0)
-Adjustments for ZUGFeRD 1.0:
-- updated header comments
-- switched to new namespace URI
-- adjusted property descriptions in the extension schema descriptions
-2013-06-19 (based on ZUGFeRD RC)
-Added a trailing hash character "#" to the "zf" namespace name as required
-by the XMP 2005 specification which is referenced in PDF/A-2 and PDF/A-3.
-Without this change Acrobat XI Preflight validation for PDF/A-3 complains
-"Extension schema present but not valid"
-2013-06-19
-Singled out the zf properties into a separate rdf:Description node to work
-around bug #4433 in PDFlib 9.0.0 which has been fixed in PDFlib 9.0.1.
-NOTE: the zf namespace has been altered to fx since ZUGfERD v2.1
--->
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-  <!-- The actual ZUGFeRD properties; adjust if required -->
-  <rdf:Description rdf:about="" xmlns:fx="urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#">
-        <fx:ConformanceLevel>EN16931</fx:ConformanceLevel>
-        <fx:DocumentFileName>EN16931.xml</fx:DocumentFileName>
-        <fx:DocumentType>INVOICE</fx:DocumentType>
-        <fx:Version>1.0</fx:Version>
-  </rdf:Description>
-
-  <!-- PDF/A extension schema description for the ZUGFeRD schema.
-     It is crucial for PDF/A-3 conformance. Don't touch! -->
-  <rdf:Description rdf:about=""
-               xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
-               xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
-               xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
-
-        <pdfaExtension:schemas>
-               <rdf:Bag>
-                  <rdf:li rdf:parseType="Resource">
-                         <pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
-                         <pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
-                         <pdfaSchema:prefix>fx</pdfaSchema:prefix>
-                         <pdfaSchema:property>
-                                <rdf:Seq>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentType</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>INVOICE</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>Version</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The actual version of the ZUGFeRD XML schema</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The conformance level of the embedded ZUGFeRD data</pdfaProperty:description>
-                                       </rdf:li>
-                                </rdf:Seq>
-                         </pdfaSchema:property>
-                  </rdf:li>
-               </rdf:Bag>
-        </pdfaExtension:schemas>
-  </rdf:Description>
-</rdf:RDF>
diff --git a/drafthorse/schema/ZUGFeRD2p2_extension_schema_EXTENDED.xmp b/drafthorse/schema/ZUGFeRD2p2_extension_schema_EXTENDED.xmp
deleted file mode 100644 (file)
index 8b00366..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-PDFlib GmbH 2013-2014
-Sample ZUGFeRD XMP with the required PDF/A extension schema description
-for the XMP properties of the ZUGFeRD schema and the actual ZUGFeRD properties.
-Schema name: ZUGFeRD Schema
-Preferred schema namespace prefix: zf
-Schema namespace URI: urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#
-Notes on the ZUGFeRD schema namespace URI:
-- The use of mixed upper/lowercase in "CrossIndustryDocument" conforms to
-  the ZUGFeRD 1.0 specification. The PDF samples distributed with the
-  ZUGFeRD 1.0 info package use all-lowercase spelling "crossindustrydocument"
-  which is not correct since it violates the ZUGFeRD specification.
-- The required trailing "#" character is missing in the comment in the
-  ZUGFeRD 1.0 extension schema description which is included in the ZUGFeRD
-  specification, but it is correctly present in the actual XMP.
-Based on the ZUGFeRD 1.0 package (published 2014-06 on www.ferd-net.de)
-which is Copyright AWV e.V. 2014.
-2014-07-01 (based on ZUGFeRD 1.0)
-Adjustments for ZUGFeRD 1.0:
-- updated header comments
-- switched to new namespace URI
-- adjusted property descriptions in the extension schema descriptions
-2013-06-19 (based on ZUGFeRD RC)
-Added a trailing hash character "#" to the "fx" namespace name as required
-by the XMP 2005 specification which is referenced in PDF/A-2 and PDF/A-3.
-Without this change Acrobat XI Preflight validation for PDF/A-3 complains
-"Extension schema present but not valid"
-2013-06-19
-Singled out the fx properties into a separate rdf:Description node to work
-NOTE: the fx namespace has been altered to fx since ZUGfERD v2.1
-around bug #4433 in PDFlib 9.0.0 which has been fixed in PDFlib 9.0.1.
--->
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-  <!-- The actual ZUGFeRD properties; adjust if required -->
-  <rdf:Description rdf:about="" xmlns:fx="urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#">
-        <fx:ConformanceLevel>EXTENDED</fx:ConformanceLevel>
-        <fx:DocumentFileName>EXTENDED.xml</fx:DocumentFileName>
-        <fx:DocumentType>INVOICE</fx:DocumentType>
-        <fx:Version>1.0</fx:Version>
-  </rdf:Description>
-
-  <!-- PDF/A extension schema description for the ZUGFeRD schema.
-     It is crucial for PDF/A-3 conformance. Don't touch! -->
-  <rdf:Description rdf:about=""
-               xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
-               xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
-               xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
-
-        <pdfaExtension:schemas>
-               <rdf:Bag>
-                  <rdf:li rdf:parseType="Resource">
-                         <pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
-                         <pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
-                         <pdfaSchema:prefix>fx</pdfaSchema:prefix>
-                         <pdfaSchema:property>
-                                <rdf:Seq>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentType</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>INVOICE</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>Version</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The actual version of the ZUGFeRD XML schema</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The conformance level of the embedded ZUGFeRD data</pdfaProperty:description>
-                                       </rdf:li>
-                                </rdf:Seq>
-                         </pdfaSchema:property>
-                  </rdf:li>
-               </rdf:Bag>
-        </pdfaExtension:schemas>
-  </rdf:Description>
-</rdf:RDF>
diff --git a/drafthorse/schema/ZUGFeRD2p2_extension_schema_MINIMUM.xmp b/drafthorse/schema/ZUGFeRD2p2_extension_schema_MINIMUM.xmp
deleted file mode 100644 (file)
index 1973af6..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-PDFlib GmbH 2013-2014
-Sample ZUGFeRD XMP with the required PDF/A extension schema description
-for the XMP properties of the ZUGFeRD schema and the actual ZUGFeRD properties.
-Schema name: ZUGFeRD Schema
-Preferred schema namespace prefix: zf
-Schema namespace URI: urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#
-Notes on the ZUGFeRD schema namespace URI:
-- The use of mixed upper/lowercase in "CrossIndustryDocument" conforms to
-  the ZUGFeRD 1.0 specification. The PDF samples distributed with the
-  ZUGFeRD 1.0 info package use all-lowercase spelling "crossindustrydocument"
-  which is not correct since it violates the ZUGFeRD specification.
-- The required trailing "#" character is missing in the comment in the
-  ZUGFeRD 1.0 extension schema description which is included in the ZUGFeRD
-  specification, but it is correctly present in the actual XMP.
-Based on the ZUGFeRD 1.0 package (published 2014-06 on www.ferd-net.de)
-which is Copyright AWV e.V. 2014.
-2014-07-01 (based on ZUGFeRD 1.0)
-Adjustments for ZUGFeRD 1.0:
-- updated header comments
-- switched to new namespace URI
-- adjusted property descriptions in the extension schema descriptions
-2013-06-19 (based on ZUGFeRD RC)
-Added a trailing hash character "#" to the "zf" namespace name as required
-by the XMP 2005 specification which is referenced in PDF/A-2 and PDF/A-3.
-Without this change Acrobat XI Preflight validation for PDF/A-3 complains
-"Extension schema present but not valid"
-2013-06-19
-Singled out the zf properties into a separate rdf:Description node to work
-around bug #4433 in PDFlib 9.0.0 which has been fixed in PDFlib 9.0.1.
-NOTE: the zf namespace has been altered to fx since ZUGfERD v2.1
--->
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
-  <!-- The actual ZUGFeRD properties; adjust if required -->
-  <rdf:Description rdf:about="" xmlns:fx="urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#">
-        <fx:ConformanceLevel>MINIMUM</fx:ConformanceLevel>
-        <fx:DocumentFileName>MINIMUM.xml</fx:DocumentFileName>
-        <fx:DocumentType>INVOICE</fx:DocumentType>
-        <fx:Version>1.0</fx:Version>
-  </rdf:Description>
-
-  <!-- PDF/A extension schema description for the ZUGFeRD schema.
-     It is crucial for PDF/A-3 conformance. Don't touch! -->
-  <rdf:Description rdf:about=""
-               xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
-               xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
-               xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
-
-        <pdfaExtension:schemas>
-               <rdf:Bag>
-                  <rdf:li rdf:parseType="Resource">
-                         <pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
-                         <pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
-                         <pdfaSchema:prefix>fx</pdfaSchema:prefix>
-                         <pdfaSchema:property>
-                                <rdf:Seq>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>DocumentType</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>INVOICE</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>Version</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The actual version of the ZUGFeRD XML schema</pdfaProperty:description>
-                                       </rdf:li>
-                                       <rdf:li rdf:parseType="Resource">
-                                          <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
-                                          <pdfaProperty:valueType>Text</pdfaProperty:valueType>
-                                          <pdfaProperty:category>external</pdfaProperty:category>
-                                          <pdfaProperty:description>The conformance level of the embedded ZUGFeRD data</pdfaProperty:description>
-                                       </rdf:li>
-                                </rdf:Seq>
-                         </pdfaSchema:property>
-                  </rdf:li>
-               </rdf:Bag>
-        </pdfaExtension:schemas>
-  </rdf:Description>
-</rdf:RDF>