diff options
Diffstat (limited to 'tex/context/base/mkxl/lpdf-wid.lmt')
-rw-r--r-- | tex/context/base/mkxl/lpdf-wid.lmt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tex/context/base/mkxl/lpdf-wid.lmt b/tex/context/base/mkxl/lpdf-wid.lmt index a75053c94..fcc7b9c99 100644 --- a/tex/context/base/mkxl/lpdf-wid.lmt +++ b/tex/context/base/mkxl/lpdf-wid.lmt @@ -259,7 +259,7 @@ local function flushembeddedfiles() for tag, reference in sortedhash(filestreams) do if not reference then report_attachment("unreferenced file, tag %a",tag) - elseif referenced[tag] == "hidden" then + elseif referenced[tag] == "hidden" or referenced[tag] == "forced" then e[#e+1] = pdfstring(tag) e[#e+1] = reference -- already a reference f[#f+1] = reference -- collect all file description references @@ -369,6 +369,9 @@ function codeinjections.embedfile(specification) } local r = pdfreference(pdfflushobject(d)) filestreams[hash] = r + if specification.forcereference == true then + referenced[hash] = "forced" + end return r end end @@ -652,9 +655,6 @@ local function insertrenderingwindow(specification) } local width = specification.width or 0 local height = specification.height or 0 - if height == 0 or width == 0 then - -- todo: sound needs no window - end context(nodeinjections.annotation(width,height,0,d(),r)) -- save ref return pdfreference(r) end @@ -705,9 +705,10 @@ local function insertrendering(specification) descriptor = pdfreference(pdfflushobject(descriptor)) elseif option[v_embed] then descriptor = codeinjections.embedfile { - file = filename, - mimetype = mimetype, -- yes or no - compress = false, + file = filename, + mimetype = mimetype, -- yes or no + compress = false, + forcereference = true, } end local clip = pdfdictionary { |