summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua22
1 files changed, 17 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
index 570d738817f..45000aebc75 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/lpdf-epa.lua
@@ -31,7 +31,6 @@ local report_field = logs.reporter("backend","field")
local report_outline = logs.reporter("backend","outline")
local lpdf = lpdf
-local epdf = epdf
local backends = backends
local context = context
@@ -73,7 +72,7 @@ local maxdimen = 0x3FFFFFFF -- 2^30-1
local bpfactor = number.dimenfactors.bp
-local layerspec = { -- predefining saves time
+local layerspec = {
"epdfcontent"
}
@@ -144,11 +143,18 @@ end
local layerused = false
+-- local function initializelayer(height,width)
+-- if not layerused then
+-- context.definelayer(layerspec, { height = height .. "bp", width = width .. "bp" })
+-- layerused = true
+-- end
+-- end
+
local function initializelayer(height,width)
- if not layerused then
- context.definelayer(layerspec, { height = height .. "bp", width = width .. "bp" })
+-- if not layerused then
+ context.setuplayer(layerspec, { height = height .. "bp", width = width .. "bp" })
layerused = true
- end
+-- end
end
function codeinjections.flushmergelayer()
@@ -295,6 +301,12 @@ function codeinjections.mergereferences(specification)
if annotation.Subtype == "Link" then
local a = annotation.A
if not a then
+ local d = annotation.Dest
+ if d then
+ annotation.A = { S = "GoTo", D = d } -- no need for a dict
+ end
+ end
+ if not a then
report_link("missing link annotation")
else
local x, y, w, h = getdimensions(annotation,llx,lly,xscale,yscale,width,height,report_link)