From dd8977db7e960a4f7887c1240df04fdbe69642cc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 15 Oct 2022 15:55:53 +0200 Subject: Merging upstream version 0.5.0. Signed-off-by: Daniel Baumann --- pydyf/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pydyf') diff --git a/pydyf/__init__.py b/pydyf/__init__.py index fac9ecc..85811f4 100755 --- a/pydyf/__init__.py +++ b/pydyf/__init__.py @@ -8,7 +8,7 @@ import zlib from codecs import BOM_UTF16_BE from hashlib import md5 -VERSION = __version__ = '0.3.0' +VERSION = __version__ = '0.5.0' def _to_bytes(item): @@ -482,6 +482,12 @@ class PDF: object_.number = len(self.objects) self.objects.append(object_) + @property + def page_references(self): + return tuple( + f'{object_number} 0 R'.encode('ascii') + for object_number in self.pages['Kids'][::3]) + def write_line(self, content, output): """Write line to output. -- cgit v1.2.3