]> git.ipfire.org Git - thirdparty/python-drafthorse.git/commitdiff
Fix #9 -- Encoding of Subtype with pypdf
authorRaphael Michel <mail@raphaelmichel.de>
Thu, 15 Jun 2023 20:30:09 +0000 (22:30 +0200)
committerRaphael Michel <mail@raphaelmichel.de>
Thu, 15 Jun 2023 20:30:20 +0000 (22:30 +0200)
drafthorse/pdf.py

index 75cc6592143261e7583779faedd74ed2d56996ac..e06c7ad9ec842d31b9a731ed67c98370da676e0b 100644 (file)
@@ -211,8 +211,7 @@ def _facturx_update_metadata_add_attachment(
         {
             NameObject("/Type"): NameObject("/EmbeddedFile"),
             NameObject("/Params"): params_dict,
-            # 2F is '/' in hexadecimal
-            NameObject("/Subtype"): NameObject("/text#2Fxml"),
+            NameObject("/Subtype"): NameObject("/text/xml"),
         }
     )
     file_entry_obj = pdf_filestream._add_object(file_entry)