Class: Preflight::Rules::OnlyEmbeddedFonts

Inherits:
Object
  • Object
show all
Defined in:
lib/preflight/rules/only_embedded_fonts.rb

Overview

Check the target PDF only uses embedded fonts

Arguments: none

Usage:

class MyPreflight
  include Preflight::Profile

  rule Preflight::Rules::OnlyEmbeddedFonts
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#issuesObject (readonly)

Returns the value of attribute issues.



20
21
22
# File 'lib/preflight/rules/only_embedded_fonts.rb', line 20

def issues
  @issues
end

Instance Method Details

#page=(page) ⇒ Object



22
23
24
25
26
27
28
29
30
31
# File 'lib/preflight/rules/only_embedded_fonts.rb', line 22

def page=(page)
  @issues = []

  page.fonts.each { |key, obj|
    obj = page.objects.deref(obj)
    if !embedded?(page.objects, obj)
      @issues << Issue.new("Font not embedded", self, :base_font => obj[:BaseFont])
    end
  }
end