1
0
Fork 0

Merging upstream version 0.6.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-08 07:47:42 +01:00
parent 72fc7a26f9
commit 60b3c4718d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 176 additions and 77 deletions

View file

@ -97,7 +97,7 @@ Display image
document = pydyf.PDF()
extra = Dictionary({
extra = pydyf.Dictionary({
'Type': '/XObject',
'Subtype': '/Image',
'Width': 197,
@ -158,9 +158,9 @@ Display text
# And display it
text = pydyf.Stream()
text.begin_text()
text.set_font_size('F1', 24)
text.set_font_size('F1', 20)
text.text_matrix(1, 0, 0, 1, 10, 90)
text.show_text(pydyf.String('Hello World'))
text.show_text(pydyf.String('Bœuf grillé & café'.encode('macroman')))
text.end_text()
document.add_object(text)
@ -179,4 +179,3 @@ Display text
with open('document.pdf', 'wb') as f:
document.write(f)