summaryrefslogtreecommitdiff
path: root/tex/context/base/lpdf-xmp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lpdf-xmp.lua')
-rw-r--r--tex/context/base/lpdf-xmp.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua
index b1a795c4b..4526b3738 100644
--- a/tex/context/base/lpdf-xmp.lua
+++ b/tex/context/base/lpdf-xmp.lua
@@ -151,6 +151,12 @@ end
local t = { } for i=1,24 do t[i] = random() end
+if not pdf.getcompresslevel then
+ pdf.getcompresslevel = function()
+ return tex.pdfcompresslevel or tex.getcount("pdfcompresslevel")
+ end
+end
+
local function flushxmpinfo()
commands.pushrandomseed()
commands.setrandomseed(os.time())
@@ -196,7 +202,7 @@ local function flushxmpinfo()
logs.poptarget()
end
blob = format(xpacket,packetid,blob)
- if not verbose and tex.pdfcompresslevel > 0 then
+ if not verbose and pdf.getcompresslevel() > 0 then
blob = gsub(blob,">%s+<","><")
end
local r = pdfflushstreamobject(blob,md,false) -- uncompressed