summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/back-pdf.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-05-25 11:48:47 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-05-25 11:48:47 +0200
commit8b678f473da7b81842dbc13b50c6303991570521 (patch)
tree53bc0e1c76c99a32011118c8941bab7b6e9b91df /tex/context/base/mkiv/back-pdf.lua
parentcaee9d5ac3c65f78671a9786318358cd647247eb (diff)
downloadcontext-8b678f473da7b81842dbc13b50c6303991570521.tar.gz
2019-05-25 10:53:00
Diffstat (limited to 'tex/context/base/mkiv/back-pdf.lua')
-rw-r--r--tex/context/base/mkiv/back-pdf.lua31
1 files changed, 26 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/back-pdf.lua b/tex/context/base/mkiv/back-pdf.lua
index 8886967e0..5f845fdcd 100644
--- a/tex/context/base/mkiv/back-pdf.lua
+++ b/tex/context/base/mkiv/back-pdf.lua
@@ -10,17 +10,38 @@ if not modules then modules = { } end modules ['back-pdf'] = {
-- the way we manage resources, info, etc. Users should use the \type {lpdf}
-- interface instead. If needed I will provide replacement functionality.
+local setmetatableindex = table.setmetatableindex
+
interfaces.implement {
name = "setpdfcompression",
arguments = { "integer", "integer" },
actions = lpdf.setcompression,
}
-if CONTEXTLMTXMODE == 0 then
- updaters.apply("backend.update.pdf")
- updaters.apply("backend.update.lpdf")
- updaters.apply("backend.update.tex")
- updaters.apply("backend.update")
+do
+
+ local dummy = function() end
+ local report = logs.reporter("backend")
+
+ local function unavailable(t,k)
+ report("calling unavailable pdf.%s function",k)
+ t[k] = dummy
+ return dummy
+ end
+
+ updaters.register("backend.update",function()
+ --
+ -- For now we keep this for tikz. If really needed some more can be made
+ -- accessible but it has to happen in a controlled way then, for instance
+ -- by first loading or enabling some compatibility layer so that we can
+ -- trace possible interferences.
+ --
+ pdf = {
+ immediateobj = pdf.immediateobj
+ }
+ setmetatableindex(pdf,unavailable)
+ end)
+
end
backends.install("pdf")