From bf7fc74b4f42f6bc1c57488da72bbc142c47f86a Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Tue, 12 Jul 2016 11:21:11 +0200 Subject: 2016-07-12 10:18:00 --- tex/context/base/mkiv/lpdf-ini.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tex/context/base/mkiv/lpdf-ini.lua') diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua index 01a045979..a0413dbcd 100644 --- a/tex/context/base/mkiv/lpdf-ini.lua +++ b/tex/context/base/mkiv/lpdf-ini.lua @@ -1009,11 +1009,20 @@ do local function flushpatterns () if next(d_patterns ) then trace_flush("patterns") pdfimmediateobject(r_patterns, tostring(d_patterns )) end end local function flushshades () if next(d_shades ) then trace_flush("shades") pdfimmediateobject(r_shades, tostring(d_shades )) end end - function lpdf.collectedresources() + -- patterns are special as they need resources to so we can get recursive references and in that case + -- acrobat doesn't show anything (other viewers handle it well) + -- + -- todo: share them + -- todo: force when not yet set + + function lpdf.collectedresources(options) local ExtGState = next(d_extgstates ) and p_extgstates local ColorSpace = next(d_colorspaces) and p_colorspaces local Pattern = next(d_patterns ) and p_patterns local Shading = next(d_shades ) and p_shades + if options and options.patterns == false then + Pattern = nil + end if ExtGState or ColorSpace or Pattern or Shading then local collected = pdfdictionary { ExtGState = ExtGState, -- cgit v1.2.3