preflight 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +5 -0
- data/README.rdoc +1 -0
- data/lib/preflight/profile.rb +13 -5
- data/lib/preflight/rules.rb +2 -0
- data/lib/preflight/rules/box_presence.rb +50 -0
- data/lib/preflight/rules/consistent_boxes.rb +6 -5
- data/lib/preflight/rules/no_cmyk.rb +14 -10
- data/lib/preflight/rules/no_devicen.rb +106 -0
- data/lib/preflight/rules/no_gray.rb +14 -10
- data/lib/preflight/rules/no_page_rotation.rb +2 -1
- data/lib/preflight/rules/no_rgb.rb +14 -10
- data/lib/preflight/rules/no_separation.rb +24 -4
- metadata +69 -54
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b7ddc412afff34baf55fd47a7ddbadc740a660df
|
4
|
+
data.tar.gz: 115e731783daf82fa25e25fc389e3214883ad904
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7ff7e7d27c1b12b2a643b11b08cbcedc8fbc6ba4886301201f4b418c2bd0244d14cf4d3dd258f373d55cb9d5af54e12961ee54ae62f3104a6193e01f7e94e8ad
|
7
|
+
data.tar.gz: 1e1d33db176f3d6addb711cb9bbbef2a2e16f25c481ee045b3eb5ff4e97f32d3e54ef9b5094b6e317e3447a2cd0c50745edb53d868cc6c01cfc255af04f4ab46
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
v0.3.0 (28th April 2013)
|
2
|
+
- new rules
|
3
|
+
- improved the behaviour of some rules
|
4
|
+
- stopped rule arguments that are mutated from affected later profile checks
|
5
|
+
|
1
6
|
v0.2.0 (25th March 2012)
|
2
7
|
- BREAKING API CHANGES FROM 0.1.1 release
|
3
8
|
- Detected issues are reported with an Issue object instead of a simple string
|
data/README.rdoc
CHANGED
@@ -121,3 +121,4 @@ This is pure ruby should run on most ruby VMs. I develop on MRI 1.9.2.
|
|
121
121
|
* http://www.planetpdf.com/planetpdf/pdfs/pdfx3_draft4.pdf
|
122
122
|
* http://www.gwg.org/doc_pdfxfaq.phtml
|
123
123
|
* http://www.pdfxreport.com/lib/exe/fetch.php?id=en%3Adownloads&cache=cache&media=en:technote_pdfx_checks.pdf
|
124
|
+
* http://shop.oreilly.com/product/0636920025269.do
|
data/lib/preflight/profile.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
+
|
3
4
|
module Preflight
|
4
5
|
|
5
6
|
# base functionality for all profiles.
|
@@ -20,12 +21,12 @@ module Preflight
|
|
20
21
|
|
21
22
|
def import(profile)
|
22
23
|
profile.rules.each do |array|
|
23
|
-
rules << array
|
24
|
+
rules << array
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
27
28
|
def rule(*args)
|
28
|
-
rules << args
|
29
|
+
rules << args
|
29
30
|
end
|
30
31
|
|
31
32
|
def rules
|
@@ -48,7 +49,7 @@ module Preflight
|
|
48
49
|
end
|
49
50
|
|
50
51
|
def rule(*args)
|
51
|
-
instance_rules << args
|
52
|
+
instance_rules << args
|
52
53
|
end
|
53
54
|
|
54
55
|
private
|
@@ -116,7 +117,7 @@ module Preflight
|
|
116
117
|
arr.first.instance_methods.map(&:to_sym).include?(:check_hash)
|
117
118
|
}.map { |arr|
|
118
119
|
klass = arr[0]
|
119
|
-
klass.new(*arr[1,10])
|
120
|
+
klass.new(*deep_clone(arr[1,10]))
|
120
121
|
}
|
121
122
|
end
|
122
123
|
|
@@ -125,9 +126,16 @@ module Preflight
|
|
125
126
|
arr.first.instance_methods.map(&:to_sym).include?(:issues)
|
126
127
|
}.map { |arr|
|
127
128
|
klass = arr[0]
|
128
|
-
klass.new(*arr[1,10])
|
129
|
+
klass.new(*deep_clone(arr[1,10]))
|
129
130
|
}
|
130
131
|
end
|
132
|
+
|
133
|
+
# round trip and object through marshall as a hacky but effective
|
134
|
+
# way to deep clone the object. Used to ensure rules that mutate
|
135
|
+
# their arguments don't impact later profile checks.
|
136
|
+
def deep_clone(obj)
|
137
|
+
Marshal.load Marshal.dump(obj)
|
138
|
+
end
|
131
139
|
end
|
132
140
|
end
|
133
141
|
end
|
data/lib/preflight/rules.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'preflight/rules/box_nesting'
|
2
|
+
require 'preflight/rules/box_presence'
|
2
3
|
require 'preflight/rules/compression_algorithms'
|
3
4
|
require 'preflight/rules/consistent_boxes'
|
4
5
|
require 'preflight/rules/cropbox_matches_mediabox'
|
@@ -12,6 +13,7 @@ require 'preflight/rules/mediabox_at_origin'
|
|
12
13
|
require 'preflight/rules/min_bleed'
|
13
14
|
require 'preflight/rules/min_ppi'
|
14
15
|
require 'preflight/rules/no_cmyk'
|
16
|
+
require 'preflight/rules/no_devicen'
|
15
17
|
require 'preflight/rules/no_filespecs'
|
16
18
|
require 'preflight/rules/no_font_subsets'
|
17
19
|
require 'preflight/rules/no_gray'
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
module Preflight
|
4
|
+
module Rules
|
5
|
+
|
6
|
+
# Specify the presence of page boxes
|
7
|
+
#
|
8
|
+
# Arguments: hash containing :any or :all key with an array value of box
|
9
|
+
# names as symbols
|
10
|
+
#
|
11
|
+
# Usage:
|
12
|
+
#
|
13
|
+
# class MyPreflight
|
14
|
+
# include Preflight::Profile
|
15
|
+
#
|
16
|
+
# rule Preflight::Rules::BoxPresence, :any => [:MediaBox, :CropBox]
|
17
|
+
# rule Preflight::Rules::BoxPresence, :all => [:MediaBox, :CropBox]
|
18
|
+
# end
|
19
|
+
#
|
20
|
+
class BoxPresence
|
21
|
+
|
22
|
+
attr_reader :issues
|
23
|
+
|
24
|
+
def initialize(options)
|
25
|
+
if options[:any].nil? && options[:all].nil?
|
26
|
+
raise "Preflight::Rules::BoxPresence requires :any or :all option"
|
27
|
+
elsif options[:any] && options[:all]
|
28
|
+
raise "Preflight::Rules::BoxPresence requires only one of :any or :all option"
|
29
|
+
end
|
30
|
+
|
31
|
+
@options = options
|
32
|
+
end
|
33
|
+
|
34
|
+
def page=(page)
|
35
|
+
dict = page.attributes
|
36
|
+
|
37
|
+
present_boxes = dict.keys & [:MediaBox, :CropBox, :TrimBox, :ArtBox]
|
38
|
+
|
39
|
+
if @options[:any] && !@options[:any].any? { |b| present_boxes.include?(b) }
|
40
|
+
@issues = [Issue.new("page must have any of #{@options[:any].join(", ")}", self, :page => page.number)]
|
41
|
+
elsif @options[:all] && !@options[:all].all? { |b| present_boxes.include?(b) }
|
42
|
+
@issues = [Issue.new("page must have all of #{@options[:all].join(", ")}", self, :page => page.number)]
|
43
|
+
else
|
44
|
+
@issues = []
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
@@ -17,14 +17,15 @@ module Preflight
|
|
17
17
|
#
|
18
18
|
class ConsistentBoxes
|
19
19
|
|
20
|
-
# each page box MUST be within .03 PDF points
|
21
|
-
# on all other pages
|
22
|
-
|
20
|
+
# Default tolerance is that each page box MUST be within .03 PDF points
|
21
|
+
# of the same box on all other pages
|
22
|
+
DEFAULT_TOLERANCE = (BigDecimal.new("-0.03")..BigDecimal.new("0.03"))
|
23
23
|
|
24
24
|
attr_reader :issues
|
25
25
|
|
26
|
-
def initialize
|
26
|
+
def initialize(tolerance = DEFAULT_TOLERANCE)
|
27
27
|
@boxes = {}
|
28
|
+
@tolerance = tolerance
|
28
29
|
end
|
29
30
|
|
30
31
|
def page=(page)
|
@@ -38,7 +39,7 @@ module Preflight
|
|
38
39
|
@boxes[:ArtBox] ||= dict[:ArtBox]
|
39
40
|
|
40
41
|
%w(MediaBox CropBox BleedBox TrimBox ArtBox).map(&:to_sym).each do |box_type|
|
41
|
-
unless subtract_all(@boxes[box_type], dict[box_type]).all? { |diff|
|
42
|
+
unless subtract_all(@boxes[box_type], dict[box_type]).all? { |diff| @tolerance.include?(diff) }
|
42
43
|
@issues << Issue.new("#{box_type} must be consistent across every page", self, :page => page.number,
|
43
44
|
:inconsistent_box => box_type)
|
44
45
|
end
|
@@ -68,20 +68,24 @@ module Preflight
|
|
68
68
|
|
69
69
|
private
|
70
70
|
|
71
|
-
def
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
71
|
+
def plain_cmyk?(cs)
|
72
|
+
cs == :DeviceCMYK || cs == [:DeviceCMYK]
|
73
|
+
end
|
74
|
+
|
75
|
+
def indexed_cmyk?(cs)
|
76
|
+
cs.is_a?(Array) && cs[0] == :Indexed && cs[1] == :DeviceCMYK
|
77
|
+
end
|
78
|
+
|
79
|
+
def alternative_is_cmyk?(cs)
|
80
|
+
cs.is_a?(Array) && cs[0] == :Separation && cs[2] == :DeviceCMYK
|
79
81
|
end
|
80
82
|
|
81
83
|
def check_color_space(label)
|
82
84
|
return if @resource_labels_seen.include?(label)
|
83
85
|
|
84
|
-
|
86
|
+
cs = @state.find_color_space(label)
|
87
|
+
|
88
|
+
if plain_cmyk?(cs) || indexed_cmyk?(cs) || alternative_is_cmyk?(cs)
|
85
89
|
@issues << Issue.new("CMYK color detected", self, :page => @page.number)
|
86
90
|
end
|
87
91
|
|
@@ -90,7 +94,7 @@ module Preflight
|
|
90
94
|
|
91
95
|
def check_xobject(xobject)
|
92
96
|
cs = xobject.hash[:ColorSpace]
|
93
|
-
if cs
|
97
|
+
if plain_cmyk?(cs) || indexed_cmyk?(cs) || alternative_is_cmyk?(cs)
|
94
98
|
@issues << Issue.new("CMYK image detected", self, :page => @page.number)
|
95
99
|
end
|
96
100
|
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'forwardable'
|
4
|
+
|
5
|
+
module Preflight
|
6
|
+
module Rules
|
7
|
+
|
8
|
+
# Some print workflows forbid the use of DeviceN colours (one or
|
9
|
+
# more spot colours).
|
10
|
+
#
|
11
|
+
# Arguments: none
|
12
|
+
#
|
13
|
+
# Usage:
|
14
|
+
#
|
15
|
+
# class MyPreflight
|
16
|
+
# include Preflight::Profile
|
17
|
+
#
|
18
|
+
# rule Preflight::Rules::NoDevicen
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
class NoDevicen
|
22
|
+
extend Forwardable
|
23
|
+
|
24
|
+
# Graphics State Operators
|
25
|
+
def_delegators :@state, :save_graphics_state, :restore_graphics_state
|
26
|
+
|
27
|
+
# Matrix Operators
|
28
|
+
def_delegators :@state, :concatenate_matrix
|
29
|
+
|
30
|
+
attr_reader :issues
|
31
|
+
|
32
|
+
# we're about to start a new page, reset state
|
33
|
+
#
|
34
|
+
def page=(page)
|
35
|
+
@page = page
|
36
|
+
@state = PDF::Reader::PageState.new(page)
|
37
|
+
@issues = []
|
38
|
+
@resource_labels_seen = []
|
39
|
+
end
|
40
|
+
|
41
|
+
# descend into nested form xobjects
|
42
|
+
#
|
43
|
+
def invoke_xobject(label)
|
44
|
+
@state.invoke_xobject(label) do |xobj|
|
45
|
+
case xobj
|
46
|
+
when PDF::Reader::FormXObject then
|
47
|
+
xobj.walk(self)
|
48
|
+
when PDF::Reader::Stream then
|
49
|
+
check_xobject(xobj)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def set_stroke_color_space(label)
|
55
|
+
check_color_space(label)
|
56
|
+
end
|
57
|
+
|
58
|
+
def set_nonstroke_color_space(label)
|
59
|
+
check_color_space(label)
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
|
64
|
+
def plain_devicen_names(cs)
|
65
|
+
if cs.is_a?(Array) && cs[0] == :DeviceN
|
66
|
+
@page.objects.deref(cs[1])
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def indexed_devicen_names(cs)
|
71
|
+
if cs.is_a?(Array) && cs[0] == :Indexed
|
72
|
+
indexed_base = @page.objects.deref(cs[1])
|
73
|
+
if indexed_base.is_a?(Array) && indexed_base[0] == :DeviceN
|
74
|
+
@page.objects.deref(indexed_base[1])
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def check_color_space(label)
|
80
|
+
return if @resource_labels_seen.include?(label)
|
81
|
+
|
82
|
+
cs = @state.find_color_space(label)
|
83
|
+
spot_names = plain_devicen_names(cs)
|
84
|
+
spot_names ||= indexed_devicen_names(cs)
|
85
|
+
if spot_names
|
86
|
+
@issues << Issue.new("DeviceN color detected", self, :page => @page.number,
|
87
|
+
:names => spot_names)
|
88
|
+
end
|
89
|
+
|
90
|
+
@resource_labels_seen << label
|
91
|
+
end
|
92
|
+
|
93
|
+
def check_xobject(xobject)
|
94
|
+
cs = xobject.hash[:ColorSpace]
|
95
|
+
spot_names = plain_devicen_names(cs)
|
96
|
+
spot_names ||= indexed_devicen_names(cs)
|
97
|
+
if spot_names
|
98
|
+
@issues << Issue.new("DeviceN image detected", self, :page => @page.number,
|
99
|
+
:names => spot_names)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|
@@ -68,20 +68,24 @@ module Preflight
|
|
68
68
|
|
69
69
|
private
|
70
70
|
|
71
|
-
def
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
71
|
+
def plain_gray?(cs)
|
72
|
+
cs == :DeviceGray || cs == [:DeviceGray]
|
73
|
+
end
|
74
|
+
|
75
|
+
def indexed_gray?(cs)
|
76
|
+
cs.is_a?(Array) && cs[0] == :Indexed && cs[1] == :DeviceGray
|
77
|
+
end
|
78
|
+
|
79
|
+
def alternative_is_gray?(cs)
|
80
|
+
cs.is_a?(Array) && cs[0] == :Separation && cs[2] == :DeviceGray
|
79
81
|
end
|
80
82
|
|
81
83
|
def check_color_space(label)
|
82
84
|
return if @resource_labels_seen.include?(label)
|
83
85
|
|
84
|
-
|
86
|
+
cs = @state.find_color_space(label)
|
87
|
+
|
88
|
+
if plain_gray?(cs) || indexed_gray?(cs) || alternative_is_gray?(cs)
|
85
89
|
@issues << Issue.new("Gray color detected", self, :page => @page.number)
|
86
90
|
end
|
87
91
|
|
@@ -90,7 +94,7 @@ module Preflight
|
|
90
94
|
|
91
95
|
def check_xobject(xobject)
|
92
96
|
cs = xobject.hash[:ColorSpace]
|
93
|
-
if cs
|
97
|
+
if plain_gray?(cs) || indexed_gray?(cs) || alternative_is_gray?(cs)
|
94
98
|
@issues << Issue.new("Gray image detected", self, :page => @page.number)
|
95
99
|
end
|
96
100
|
end
|
@@ -25,12 +25,13 @@ module Preflight
|
|
25
25
|
def page=(page)
|
26
26
|
attrs = page.attributes
|
27
27
|
|
28
|
-
if attrs[:Rotate] && attrs[:Rotate] != 0
|
28
|
+
if attrs[:Rotate] && page.objects.deref(attrs[:Rotate]) != 0
|
29
29
|
@issues = [Issue.new("Page is rotated", self, :page => page.number)]
|
30
30
|
else
|
31
31
|
@issues = []
|
32
32
|
end
|
33
33
|
end
|
34
|
+
|
34
35
|
end
|
35
36
|
end
|
36
37
|
end
|
@@ -68,20 +68,24 @@ module Preflight
|
|
68
68
|
|
69
69
|
private
|
70
70
|
|
71
|
-
def
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
71
|
+
def plain_rgb?(cs)
|
72
|
+
cs == :DeviceRGB || cs == [:DeviceRGB]
|
73
|
+
end
|
74
|
+
|
75
|
+
def indexed_rgb?(cs)
|
76
|
+
cs.is_a?(Array) && cs[0] == :Indexed && cs[1] == :DeviceRGB
|
77
|
+
end
|
78
|
+
|
79
|
+
def alternative_is_rgb?(cs)
|
80
|
+
cs.is_a?(Array) && cs[0] == :Separation && cs[2] == :DeviceRGB
|
79
81
|
end
|
80
82
|
|
81
83
|
def check_color_space(label)
|
82
84
|
return if @resource_labels_seen.include?(label)
|
83
85
|
|
84
|
-
|
86
|
+
cs = @state.find_color_space(label)
|
87
|
+
|
88
|
+
if plain_rgb?(cs) || indexed_rgb?(cs) || alternative_is_rgb?(cs)
|
85
89
|
@issues << Issue.new("RGB color detected", self, :page => @page.number)
|
86
90
|
end
|
87
91
|
|
@@ -90,7 +94,7 @@ module Preflight
|
|
90
94
|
|
91
95
|
def check_xobject(xobject)
|
92
96
|
cs = xobject.hash[:ColorSpace]
|
93
|
-
if cs
|
97
|
+
if plain_rgb?(cs) || indexed_rgb?(cs) || alternative_is_rgb?(cs)
|
94
98
|
@issues << Issue.new("RGB image detected", self, :page => @page.number)
|
95
99
|
end
|
96
100
|
end
|
@@ -45,6 +45,8 @@ module Preflight
|
|
45
45
|
case xobj
|
46
46
|
when PDF::Reader::FormXObject then
|
47
47
|
xobj.walk(self)
|
48
|
+
when PDF::Reader::Stream then
|
49
|
+
check_xobject(xobj)
|
48
50
|
end
|
49
51
|
end
|
50
52
|
end
|
@@ -59,18 +61,26 @@ module Preflight
|
|
59
61
|
|
60
62
|
private
|
61
63
|
|
62
|
-
def
|
64
|
+
def plain_separation_name(cs)
|
63
65
|
if cs.is_a?(Array) && cs[0] == :Separation
|
64
66
|
cs[1]
|
65
|
-
|
66
|
-
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def indexed_separation_name(cs)
|
71
|
+
if cs.is_a?(Array) && cs[0] == :Indexed
|
72
|
+
if cs[1].is_a?(Array) && cs[1][0] == :Separation
|
73
|
+
cs[1][1]
|
74
|
+
end
|
67
75
|
end
|
68
76
|
end
|
69
77
|
|
70
78
|
def check_color_space(label)
|
71
79
|
return if @resource_labels_seen.include?(label)
|
72
80
|
|
73
|
-
|
81
|
+
cs = @state.find_color_space(label)
|
82
|
+
spot_name = plain_separation_name(cs)
|
83
|
+
spot_name ||= indexed_separation_name(cs)
|
74
84
|
if spot_name
|
75
85
|
@issues << Issue.new("Separation color detected #{spot_name}", self, :page => @page.number,
|
76
86
|
:name => spot_name)
|
@@ -79,6 +89,16 @@ module Preflight
|
|
79
89
|
@resource_labels_seen << label
|
80
90
|
end
|
81
91
|
|
92
|
+
def check_xobject(xobject)
|
93
|
+
cs = xobject.hash[:ColorSpace]
|
94
|
+
spot_name = plain_separation_name(cs)
|
95
|
+
spot_name ||= indexed_separation_name(cs)
|
96
|
+
if spot_name
|
97
|
+
@issues << Issue.new("Separation image detected", self, :page => @page.number,
|
98
|
+
:name => spot_name)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
82
102
|
end
|
83
103
|
|
84
104
|
end
|
metadata
CHANGED
@@ -1,71 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: preflight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- James Healy
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: pdf-reader
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 1.1.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.1.0
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rake
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: roodi
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - '>='
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :development
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: rspec
|
49
|
-
requirement:
|
50
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '2.3'
|
55
62
|
type: :development
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.3'
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: ZenTest
|
60
|
-
requirement:
|
61
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
73
|
- - ~>
|
64
74
|
- !ruby/object:Gem::Version
|
65
75
|
version: 4.4.2
|
66
76
|
type: :development
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 4.4.2
|
69
83
|
description: Provides a programatic way to check a PDF file conforms to standards
|
70
84
|
like PDF-X/1a
|
71
85
|
email:
|
@@ -77,49 +91,52 @@ extra_rdoc_files: []
|
|
77
91
|
files:
|
78
92
|
- lib/preflight.rb
|
79
93
|
- lib/preflight/profile.rb
|
80
|
-
- lib/preflight/
|
94
|
+
- lib/preflight/rules.rb
|
95
|
+
- lib/preflight/rules/page_box_size.rb
|
96
|
+
- lib/preflight/rules/page_count.rb
|
97
|
+
- lib/preflight/rules/no_cmyk.rb
|
81
98
|
- lib/preflight/rules/no_separation.rb
|
82
|
-
- lib/preflight/rules/
|
83
|
-
- lib/preflight/rules/
|
84
|
-
- lib/preflight/rules/
|
85
|
-
- lib/preflight/rules/match_info_entries.rb
|
99
|
+
- lib/preflight/rules/info_has_keys.rb
|
100
|
+
- lib/preflight/rules/document_id.rb
|
101
|
+
- lib/preflight/rules/no_registration_black.rb
|
86
102
|
- lib/preflight/rules/box_nesting.rb
|
87
|
-
- lib/preflight/rules/
|
88
|
-
- lib/preflight/rules/page_box_size.rb
|
89
|
-
- lib/preflight/rules/max_ink_density.rb
|
103
|
+
- lib/preflight/rules/max_version.rb
|
90
104
|
- lib/preflight/rules/page_box_width.rb
|
91
|
-
- lib/preflight/rules/pdfx_output_intent_has_keys.rb
|
92
|
-
- lib/preflight/rules/min_bleed.rb
|
93
105
|
- lib/preflight/rules/no_rgb.rb
|
106
|
+
- lib/preflight/rules/pdfx_output_intent_has_keys.rb
|
94
107
|
- lib/preflight/rules/page_box_height.rb
|
95
|
-
- lib/preflight/rules/
|
96
|
-
- lib/preflight/rules/min_ppi.rb
|
97
|
-
- lib/preflight/rules/no_transparency.rb
|
98
|
-
- lib/preflight/rules/no_filespecs.rb
|
108
|
+
- lib/preflight/rules/no_devicen.rb
|
99
109
|
- lib/preflight/rules/no_gray.rb
|
100
|
-
- lib/preflight/rules/
|
101
|
-
- lib/preflight/rules/
|
102
|
-
- lib/preflight/rules/
|
110
|
+
- lib/preflight/rules/no_filespecs.rb
|
111
|
+
- lib/preflight/rules/max_ink_density.rb
|
112
|
+
- lib/preflight/rules/box_presence.rb
|
113
|
+
- lib/preflight/rules/print_boxes.rb
|
114
|
+
- lib/preflight/rules/no_transparency.rb
|
115
|
+
- lib/preflight/rules/no_page_rotation.rb
|
103
116
|
- lib/preflight/rules/no_font_subsets.rb
|
104
|
-
- lib/preflight/rules/compression_algorithms.rb
|
105
|
-
- lib/preflight/rules/mediabox_at_origin.rb
|
106
117
|
- lib/preflight/rules/cropbox_matches_mediabox.rb
|
107
|
-
- lib/preflight/rules/
|
108
|
-
- lib/preflight/rules/
|
109
|
-
- lib/preflight/rules/
|
110
|
-
- lib/preflight/rules/
|
111
|
-
- lib/preflight/rules/
|
118
|
+
- lib/preflight/rules/info_specifies_trapping.rb
|
119
|
+
- lib/preflight/rules/output_intent_for_pdfx.rb
|
120
|
+
- lib/preflight/rules/mediabox_at_origin.rb
|
121
|
+
- lib/preflight/rules/match_info_entries.rb
|
122
|
+
- lib/preflight/rules/no_private_data.rb
|
112
123
|
- lib/preflight/rules/consistent_boxes.rb
|
113
|
-
- lib/preflight/
|
114
|
-
- lib/preflight/
|
115
|
-
- lib/preflight/rules.rb
|
124
|
+
- lib/preflight/rules/only_embedded_fonts.rb
|
125
|
+
- lib/preflight/rules/min_bleed.rb
|
126
|
+
- lib/preflight/rules/compression_algorithms.rb
|
127
|
+
- lib/preflight/rules/min_ppi.rb
|
128
|
+
- lib/preflight/rules/root_has_keys.rb
|
116
129
|
- lib/preflight/measurements.rb
|
117
130
|
- lib/preflight/issue.rb
|
131
|
+
- lib/preflight/profiles.rb
|
132
|
+
- lib/preflight/profiles/pdfa1a.rb
|
133
|
+
- lib/preflight/profiles/pdfx1a.rb
|
118
134
|
- bin/is_pdfx_1a
|
119
135
|
- README.rdoc
|
120
136
|
- CHANGELOG
|
121
137
|
homepage: http://github.com/yob/pdf-preflight
|
122
138
|
licenses: []
|
139
|
+
metadata: {}
|
123
140
|
post_install_message:
|
124
141
|
rdoc_options:
|
125
142
|
- --title
|
@@ -128,21 +145,19 @@ rdoc_options:
|
|
128
145
|
require_paths:
|
129
146
|
- lib
|
130
147
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
148
|
requirements:
|
133
|
-
- -
|
149
|
+
- - '>='
|
134
150
|
- !ruby/object:Gem::Version
|
135
151
|
version: 1.8.7
|
136
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
153
|
requirements:
|
139
|
-
- -
|
154
|
+
- - '>='
|
140
155
|
- !ruby/object:Gem::Version
|
141
156
|
version: 1.3.2
|
142
157
|
requirements: []
|
143
158
|
rubyforge_project:
|
144
|
-
rubygems_version:
|
159
|
+
rubygems_version: 2.0.0
|
145
160
|
signing_key:
|
146
|
-
specification_version:
|
161
|
+
specification_version: 4
|
147
162
|
summary: Check PDF files conform to various standards
|
148
163
|
test_files: []
|