summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lpdf-ini.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-07-12 11:21:11 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-07-12 11:21:11 +0200
commitbf7fc74b4f42f6bc1c57488da72bbc142c47f86a (patch)
treef68db389c0e7902a504f682061d25b1fd103b963 /tex/context/base/mkiv/lpdf-ini.lua
parent74326d3975653dbc32ce3cd8b431dba40917e7dc (diff)
downloadcontext-bf7fc74b4f42f6bc1c57488da72bbc142c47f86a.tar.gz
2016-07-12 10:18:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-ini.lua')
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua11
1 files changed, 10 insertions, 1 deletions
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,