diff options
Diffstat (limited to 'tex/context/base/lpdf-xmp.lua')
-rw-r--r-- | tex/context/base/lpdf-xmp.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua index 160a5ece1..c9bead8a5 100644 --- a/tex/context/base/lpdf-xmp.lua +++ b/tex/context/base/lpdf-xmp.lua @@ -14,7 +14,9 @@ local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp local report_xmp = logs.reporter("backend","xmp") -local lpdf = lpdf +local backends, lpdf = backends, lpdf + +local codeinjections = backends.pdf.codeinjections -- normally it is registered local pdfdictionary = lpdf.dictionary local pdfconstant = lpdf.constant @@ -77,11 +79,7 @@ local mapping = { local xmp, xmpfile, xmpname = nil, nil, "lpdf-pdx.xml" -function lpdf.setxmpfile(name) - -- xmpfile = resolvers.findctxfile(name) or "" - -- if xmpfile == "" then - -- xmpfile = nil - -- end +local function setxmpfile(name) if xmp then report_xmp("discarding loaded file '%s'",xmpfile) xmp = nil @@ -89,6 +87,9 @@ function lpdf.setxmpfile(name) xmpfile = name ~= "" and name end +codeinjections.setxmpfile = setxmpfile +commands.setxmpfile = setxmpfile + local function valid_xmp() if not xmp then -- local xmpfile = xmpfile or resolvers.findfile(xmpname) or "" |