diff --git a/luametalatex-baseregisters.lua b/luametalatex-baseregisters.lua index c8f855c..95c000f 100644 --- a/luametalatex-baseregisters.lua +++ b/luametalatex-baseregisters.lua @@ -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: diff --git a/luametalatex-pdf.lua b/luametalatex-pdf.lua index 05b92c2..074ef9e 100644 --- a/luametalatex-pdf.lua +++ b/luametalatex-pdf.lua @@ -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