Skip to content

Commit

Permalink
Print annotations with PDF/A as required by specification
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Dec 23, 2022
1 parent 419c771 commit 0f2e377
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions weasyprint/pdf/pdfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ def pdfa(pdf, metadata, document, page_streams, version):
}),
])

# Print annotations
for pdf_object in pdf.objects:
if isinstance(pdf_object, dict) and pdf_object.get('Type') == '/Annot':
pdf_object['F'] = 2 ** (3 - 1)

# Common PDF metadata stream
add_metadata(pdf, metadata, 'a', version, 'B')

Expand Down

0 comments on commit 0f2e377

Please sign in to comment.