summaryrefslogtreecommitdiffstats
path: root/docs/common_use_cases.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:29:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:29:21 +0000
commit3136ffb7c57ef56e0609ceb3c7726ea4f51f3574 (patch)
tree57df199141ce79f945ce394b6007424cbf31aa04 /docs/common_use_cases.rst
parentAdding upstream version 0.5.0. (diff)
downloadpydyf-e010ddbf9aa10a548a4f5d42b3f8a8d7bed10484.tar.xz
pydyf-e010ddbf9aa10a548a4f5d42b3f8a8d7bed10484.zip
Adding upstream version 0.6.0.upstream/0.6.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/common_use_cases.rst')
-rw-r--r--docs/common_use_cases.rst7
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)
-