Class: Preflight::Rules::NoDevicen

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/preflight/rules/no_devicen.rb

Overview

Some print workflows forbid the use of DeviceN colours (one or more spot colours).

Arguments: none

Usage:

class MyPreflight
  include Preflight::Profile

  rule Preflight::Rules::NoDevicen
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#issuesObject (readonly)

Returns the value of attribute issues.



30
31
32
# File 'lib/preflight/rules/no_devicen.rb', line 30

def issues
  @issues
end

Instance Method Details

#invoke_xobject(label) ⇒ Object

descend into nested form xobjects



43
44
45
46
47
48
49
50
51
52
# File 'lib/preflight/rules/no_devicen.rb', line 43

def invoke_xobject(label)
  @state.invoke_xobject(label) do |xobj|
    case xobj
    when PDF::Reader::FormXObject then
      xobj.walk(self)
    when PDF::Reader::Stream then
      check_xobject(xobj)
    end
  end
end

#page=(page) ⇒ Object

we’re about to start a new page, reset state



34
35
36
37
38
39
# File 'lib/preflight/rules/no_devicen.rb', line 34

def page=(page)
  @page   = page
  @state  = PDF::Reader::PageState.new(page)
  @issues = []
  @resource_labels_seen = []
end

#set_nonstroke_color_space(label) ⇒ Object



58
59
60
# File 'lib/preflight/rules/no_devicen.rb', line 58

def set_nonstroke_color_space(label)
  check_color_space(label)
end

#set_stroke_color_space(label) ⇒ Object



54
55
56
# File 'lib/preflight/rules/no_devicen.rb', line 54

def set_stroke_color_space(label)
  check_color_space(label)
end