mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2025-12-30 00:31:59 +00:00
JBIG2: Streams created in this manner are already indirect objects
This commit is contained in:
parent
7889c6fb4c
commit
e40228102c
@ -1109,7 +1109,6 @@ def optimize_pdf(
|
||||
prefix = 'group{:08d}'.format(imgrp)
|
||||
jbig2_globals_data = (root / (prefix + '.sym')).read_bytes()
|
||||
jbig2_globals = pikepdf.Stream(pike, jbig2_globals_data)
|
||||
jbig2_globals_indirect = pike.make_indirect(jbig2_globals)
|
||||
|
||||
for n, xref in enumerate(xrefs):
|
||||
jbig2_im_file = root / (prefix + '.{:04d}'.format(n))
|
||||
@ -1121,7 +1120,7 @@ def optimize_pdf(
|
||||
im_obj.write(
|
||||
jbig2_im_data, pikepdf.Name('/JBIG2Decode'),
|
||||
pikepdf.Dictionary({
|
||||
'/JBIG2Globals': jbig2_globals_indirect
|
||||
'/JBIG2Globals': jbig2_globals
|
||||
})
|
||||
)
|
||||
log.info(repr(im_obj))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user