Skip to content

Commit

Permalink
Force reference for Rendition embedded files
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasakm committed Jul 30, 2021
1 parent 6db2cd9 commit 681c36d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tex/context/base/mkxl/lpdf-wid.lmt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -705,9 +708,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 {
Expand Down

0 comments on commit 681c36d

Please sign in to comment.