summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lpdf-xmp.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-11-18 16:12:36 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-11-18 16:12:36 +0100
commit744095aa4676553437db0d71c281a74557a3222f (patch)
treebfdf5d203b5fbfa44ee7db705d3b3475361ad28f /tex/context/base/mkiv/lpdf-xmp.lua
parente2ee706a3114129601a30908d6b8cbb57068d32c (diff)
downloadcontext-744095aa4676553437db0d71c281a74557a3222f.tar.gz
2018-11-18 14:16:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-xmp.lua')
-rw-r--r--tex/context/base/mkiv/lpdf-xmp.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/lpdf-xmp.lua b/tex/context/base/mkiv/lpdf-xmp.lua
index ac07e4a3d..3693df2a8 100644
--- a/tex/context/base/mkiv/lpdf-xmp.lua
+++ b/tex/context/base/mkiv/lpdf-xmp.lua
@@ -11,6 +11,7 @@ local tostring, type = tostring, type
local format, gsub = string.format, string.gsub
local utfchar = utf.char
local xmlfillin = xml.fillin
+local md5HEX = md5.HEX
local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end)
local trace_info = false trackers.register("backend.info", function(v) trace_info = v end)
@@ -33,7 +34,7 @@ local pdfgetmetadata = lpdf.getmetadata
-- XMP-Toolkit-SDK-CC201607.zip. So we hardcode the id.
local xpacket = format ( [[
-<?xpacket begin="%s" id="W5M0MpCehiHzreSzNTczkc9d"?>
+<?xpacket begin="%s" id="W5M0MpCehiHzreSzNTczkc9d"?>
%%s
@@ -104,16 +105,13 @@ pdf.setsuppressoptionalinfo(
)
local included = backends.included
-
-local pdfsettrailerid = pdf.settrailerid
-
-local lpdfid = lpdf.id
+local lpdfid = lpdf.id
function lpdf.id() -- overload of ini
return lpdfid(included.date)
end
-pdf.disablecommand("settrailerid")
+local pdfsettrailerid = lpdf.settrailerid -- this is the wrapped one
function lpdf.settrailerid(v)
if v then
@@ -123,7 +121,7 @@ function lpdf.settrailerid(v)
else
v = tostring(v)
end
- local h = md5.HEX(v)
+ local h = md5HEX(v)
if b then
report_info("using frozen trailer id")
else
@@ -313,7 +311,7 @@ local function flushxmpinfo()
commands.poprandomseed() -- hack
end
--- his will be enabled when we can inhibit compression for a stream at the lua end
+-- this will be enabled when we can inhibit compression for a stream at the lua end
lpdf.registerdocumentfinalizer(flushxmpinfo,1,"metadata")