1
0
Fork 0

Adding 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:28 +01:00
parent 7464539b0b
commit 7c27e920bb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 176 additions and 77 deletions

View file

@ -7,13 +7,17 @@ API Reference
:members:
.. autoclass:: Dictionary
:show-inheritance:
.. autoclass:: Stream
:members:
:show-inheritance:
.. autoclass:: String
:show-inheritance:
.. autoclass:: Array
:show-inheritance:
.. autoclass:: PDF
:members:

View file

@ -2,6 +2,40 @@ Changelog
=========
Version 0.6.0
-------------
Released on 2023-03-29.
New features:
* Add an option to use compressed object streams for PDF 1.5+, with financial support from Code & Co.
* Add new text operators
* Clean and fix documentation
Backers and sponsors:
* Kobalt
* Grip Angebotssoftware
* Spacinov
* Crisp BV
* Castedo Ellerman
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Moritz Mahringer
* Yanal-Yvez Fargialla
* Piotr Horzycki
* Healthchecks.io
* Hammerbacher
* TrainingSparkle
* Synapsium
Version 0.5.0
-------------
@ -10,7 +44,7 @@ Released on 2022-10-11.
New features:
* Add the PDF.page_references property
* Revert the PDF.pages['Kids'] behavior to be retro-compatible with version 0.3.0
* Revert the PDF.pages['Kids'] behavior to be backwards compatible with version 0.3.0
Backers and sponsors:

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)