Skip to content

Commit dc9396a

Browse files
authored
fix size=0 Bytes bug (#71)
1 parent 69a133c commit dc9396a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drafthorse/pdf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
DecodedStreamObject,
3535
DictionaryObject,
3636
NameObject,
37+
NumberObject,
3738
create_string_object,
3839
)
3940

@@ -196,7 +197,7 @@ def _update_metadata_add_attachment(
196197
# NameObject('/CheckSum'): md5sum_obj,
197198
NameObject("/ModDate"): create_string_object(pdf_date),
198199
NameObject("/CreationDate"): create_string_object(pdf_date),
199-
NameObject("/Size"): create_string_object(str(len(facturx_xml_str))),
200+
NameObject("/Size"): NumberObject(len(facturx_xml_str)),
200201
}
201202
)
202203
file_entry = DecodedStreamObject()

0 commit comments

Comments
 (0)