forked from josch/img2pdf
pass deterministic_id=True to writer.save() for pikepdf >= 6.2.0
Closes: #150
This commit is contained in:
parent
10c6901fa3
commit
be8369373f
1 changed files with 4 additions and 1 deletions
|
@ -1259,8 +1259,11 @@ class pdfdoc(object):
|
||||||
|
|
||||||
# now write out the PDF
|
# now write out the PDF
|
||||||
if self.engine == Engine.pikepdf:
|
if self.engine == Engine.pikepdf:
|
||||||
|
kwargs = {}
|
||||||
|
if pikepdf.__version__ >= "6.2.0":
|
||||||
|
kwargs["deterministic_id"] = True
|
||||||
self.writer.save(
|
self.writer.save(
|
||||||
outputstream, min_version=self.output_version, linearize=True
|
outputstream, min_version=self.output_version, linearize=True, **kwargs
|
||||||
)
|
)
|
||||||
elif self.engine == Engine.pdfrw:
|
elif self.engine == Engine.pdfrw:
|
||||||
self.writer.trailer.Info = self.writer.docinfo
|
self.writer.trailer.Info = self.writer.docinfo
|
||||||
|
|
Loading…
Reference in a new issue