Object stream configuration option

This commit is contained in:
Marcel Krüger 2020-07-09 09:55:20 +02:00
parent 1195e0f201
commit 3ee7a52bdd
2 changed files with 3 additions and 4 deletions

View File

@ -131,9 +131,9 @@ pdf_variable(dimen_code, token.scan_dimen, 'destmargin', tex.sp'0pt')
pdf_variable(dimen_code, token.scan_dimen, 'threadmargin', tex.sp'0pt') -- We don't support threads, so this isn't doing anything
pdf_variable(count_code, token.scan_int, 'majorversion', 1)
pdf_variable(count_code, token.scan_int, 'minorversion', 7)
pdf_variable(count_code, token.scan_int, 'compresslevel', 0)
pdf_variable(count_code, token.scan_int, 'compresslevel', 9)
pdf_variable(count_code, token.scan_int, 'objcompresslevel', 3)
pdf_variable(count_code, token.scan_int, 'objcompresslevel', 0, true) -- TODO ... not particularly urgent
pdf_variable(count_code, token.scan_int, 'decimaldigits', 4, true) -- Will probably stay fixed, but should be more consistent
pdf_variable(count_code, token.scan_int, 'gentounicode', 0, true) -- We expect the fontloader to generade tounicode tables. Might change at some point
-- These two are ignored, but that is consistent with pdfTeX as long as imageapplygamma is 0:

View File

@ -8,7 +8,6 @@ local assigned = {}
local delayed = {}
local compress = xzip.compress
local pdfvariable = pdf.variable
local do_objstream = true
-- slightly tricky interface: No/nil return means that the objects content
-- isn't known yet, while false indicates a delayed object.
local function written(pdf, num)
@ -61,7 +60,7 @@ local function indirect(pdf, num, content, isfile, objstream)
content = f:read'a'
f:close()
end
if objstream ~= false and do_objstream then
if objstream ~= false and pdfvariable.objcompresslevel ~= 0 then
objstream = objstream or true
local objstr = pdf.objstream[objstream]
if not objstr then