From: Raphael Michel Date: Thu, 15 Jun 2023 20:30:09 +0000 (+0200) Subject: Fix #9 -- Encoding of Subtype with pypdf X-Git-Tag: 2.4.0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a3e65a8b36cd1318238388c2b216aabc2610df5;p=thirdparty%2Fpython-drafthorse.git Fix #9 -- Encoding of Subtype with pypdf --- diff --git a/drafthorse/pdf.py b/drafthorse/pdf.py index 75cc659..e06c7ad 100644 --- a/drafthorse/pdf.py +++ b/drafthorse/pdf.py @@ -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)