Skip to content

Commit 0f2e377

Browse files
committed
Print annotations with PDF/A as required by specification
1 parent 419c771 commit 0f2e377

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

weasyprint/pdf/pdfa.py

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ def pdfa(pdf, metadata, document, page_streams, version):
4040
}),
4141
])
4242

43+
# Print annotations
44+
for pdf_object in pdf.objects:
45+
if isinstance(pdf_object, dict) and pdf_object.get('Type') == '/Annot':
46+
pdf_object['F'] = 2 ** (3 - 1)
47+
4348
# Common PDF metadata stream
4449
add_metadata(pdf, metadata, 'a', version, 'B')
4550

0 commit comments

Comments
 (0)