1if not modules then modules = { } end modules ['back-pdf'] = {
2 version = 1.001,
3 comment = "companion to back-pdf.mkiv",
4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5 copyright = "PRAGMA ADE / ConTeXt Development Team",
6 license = "see context related readme files"
7}
8
9
10
11
12
13local setmetatableindex = table.setmetatableindex
14
15local pdfsetcompression = lpdf.setcompression
16local pdfimmediateobject = lpdf.immediateobject
17
18interfaces.implement {
19 name = "setpdfcompression",
20 arguments = { "integer", "integer" },
21 actions = function(...) pdfsetcompression(...) end,
22}
23
24do
25
26 local dummy = function() end
27 local report = logs.reporter("backend")
28
29 local function unavailable(t,k)
30 report("calling unavailable pdf.%s function",k)
31 t[k] = dummy
32 return dummy
33 end
34
35 updaters.register("backend.update",function()
36
37
38
39
40
41
42 pdf = {
43 immediateobj = pdfimmediateobject
44 }
45 setmetatableindex(pdf,unavailable)
46 end)
47
48end
49
50backends.install("pdf")
51 |