diff options
Diffstat (limited to 'tex/context/base/mkiv/lpdf-u3d.lua')
-rw-r--r-- | tex/context/base/mkiv/lpdf-u3d.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/lpdf-u3d.lua b/tex/context/base/mkiv/lpdf-u3d.lua index dfd4c1b06..2a45a1eb5 100644 --- a/tex/context/base/mkiv/lpdf-u3d.lua +++ b/tex/context/base/mkiv/lpdf-u3d.lua @@ -347,6 +347,12 @@ end local stored_js, stored_3d, stored_pr, streams = { }, { }, { }, { } +local f_image = formatters["q /GS gs %.6F 0 0 %.6F 0 0 cm /IM Do Q"] + +directives.register("pdf.stripzeros",function() + f_image = formatters["q /GS gs %.6N 0 0 %.6N 0 0 cm /IM Do Q"] +end) + local function insert3d(spec) -- width, height, factor, display, controls, label, foundname local width, height, factor = spec.width, spec.height, spec.factor or number.dimenfactors.bp @@ -461,7 +467,7 @@ local function insert3d(spec) -- width, height, factor, display, controls, label }, ProcSet = pdfarray { pdfconstant("PDF"), pdfconstant("ImageC") }, } - local pwd = pdfflushstreamobject(formatters["q /GS gs %.6F 0 0 %.6F 0 0 cm /IM Do Q"](factor*width,factor*height),pw) + local pwd = pdfflushstreamobject(f_image(factor*width,factor*height),pw) annot.AP = pdfdictionary { N = pdfreference(pwd) } |