diff options
Diffstat (limited to 'docs/common_use_cases.rst')
-rw-r--r-- | docs/common_use_cases.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/common_use_cases.rst b/docs/common_use_cases.rst index 45e2d3d..b045fa6 100644 --- a/docs/common_use_cases.rst +++ b/docs/common_use_cases.rst @@ -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) - |