Merging upstream version 0.6.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
72fc7a26f9
commit
60b3c4718d
4 changed files with 176 additions and 77 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue