pdfrb 0.7.25 → 0.7.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdfrb/model/cos/dictionary.rb +22 -2
  3. data/lib/pdfrb/model/type/box_color_info.rb +1 -0
  4. data/lib/pdfrb/model/type/cal_gray.rb +1 -0
  5. data/lib/pdfrb/model/type/cal_rgb.rb +1 -0
  6. data/lib/pdfrb/model/type/color_space.rb +230 -0
  7. data/lib/pdfrb/model/type/function_exponential.rb +1 -0
  8. data/lib/pdfrb/model/type/function_postscript.rb +1 -0
  9. data/lib/pdfrb/model/type/function_sampled.rb +1 -0
  10. data/lib/pdfrb/model/type/function_stitching.rb +1 -0
  11. data/lib/pdfrb/model/type/halftone_type1.rb +1 -0
  12. data/lib/pdfrb/model/type/halftone_type10.rb +1 -0
  13. data/lib/pdfrb/model/type/halftone_type16.rb +1 -0
  14. data/lib/pdfrb/model/type/halftone_type5.rb +1 -0
  15. data/lib/pdfrb/model/type/halftone_type6.rb +1 -0
  16. data/lib/pdfrb/model/type/icc_based_color_space.rb +1 -0
  17. data/lib/pdfrb/model/type/lab.rb +1 -0
  18. data/lib/pdfrb/model/type/media_offset.rb +7 -0
  19. data/lib/pdfrb/model/type/misc_helpers.rb +1 -0
  20. data/lib/pdfrb/model/type/page_label.rb +1 -0
  21. data/lib/pdfrb/model/type/rich_media_activation.rb +1 -0
  22. data/lib/pdfrb/model/type/rich_media_animation.rb +1 -0
  23. data/lib/pdfrb/model/type/rich_media_command.rb +1 -0
  24. data/lib/pdfrb/model/type/rich_media_configuration.rb +1 -0
  25. data/lib/pdfrb/model/type/rich_media_content.rb +1 -0
  26. data/lib/pdfrb/model/type/rich_media_cue_point.rb +1 -0
  27. data/lib/pdfrb/model/type/rich_media_deactivation.rb +1 -0
  28. data/lib/pdfrb/model/type/rich_media_instance.rb +1 -0
  29. data/lib/pdfrb/model/type/rich_media_presentation.rb +1 -0
  30. data/lib/pdfrb/model/type/rich_media_settings.rb +1 -0
  31. data/lib/pdfrb/model/type/rich_media_window.rb +1 -0
  32. data/lib/pdfrb/model/type.rb +18 -0
  33. data/lib/pdfrb/version.rb +1 -1
  34. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eb0494d4b1e603ab1e6fad59bb5daa3d3ad1df02dcd57ed6b2f2445655b72d2
4
- data.tar.gz: 3e6aae264376ab5f3027d89500d883bea9fe95a39fadc2bd01cc0f83b4914c45
3
+ metadata.gz: ce9a47537d34e93b14dfb8045494c1c3c0791b2d7e55f788fff4d11cbf30e193
4
+ data.tar.gz: 90e8479cfc14d1bcfbc0d4f57ea4d3dfd224dda886fa6a3234a136b895620616
5
5
  SHA512:
6
- metadata.gz: 7db4a10fc882da2a6b1eea1a84bff7868ffac59345ba5c7596fec36bb31fd519b8c08594f6c68362ee12802c88e1ebce20ad4fef9cfba162e686d1e393e5f3d4
7
- data.tar.gz: 7491b71494824241e04c771bfc4a229d9e4b33ddcdbd4a49b99faa260f8866a6d08eef391f1947b93a207b72312e103d9809e8b2eac45a0a063f3d1e5f8314d1
6
+ metadata.gz: eedc71874d169182804bebbf46322ddbcec5fb94866d4d0ac134e1ab04479803a6310e42682138db211743d4ffd22eb47393aae109fb921bc4d031f676ee47d8
7
+ data.tar.gz: 60693b88b2d817632f779cd8ad5200d37ef2ae2a62d0e10b0407b795b4534705fc1fb66cda174f516f04735f2fecde418d59fcbb34912a862c7a5fb579007dae
@@ -164,12 +164,32 @@ module Pdfrb
164
164
  private :arlington_required?
165
165
 
166
166
  def arlington_default(field_def)
167
- return nil if field_def.default_value.nil?
167
+ raw = field_def.default_value
168
+ return nil if raw.nil?
169
+ return raw unless raw.is_a?(::String)
168
170
 
169
- field_def.default_value
171
+ if raw.start_with?("[") && raw.end_with?("]")
172
+ return raw[1..-2].split.then { |tokens| tokens.map { |t| arlington_scalar(t) } }
173
+ end
174
+
175
+ arlington_scalar(raw)
170
176
  end
171
177
  private :arlington_default
172
178
 
179
+ # TSV default cells are raw strings; convert per scalar
180
+ # shape so typed access returns Integer/Symbol/etc.
181
+ def arlington_scalar(token)
182
+ case token
183
+ when "true" then true
184
+ when "false" then false
185
+ when "null" then nil
186
+ when /\A-?\d+\z/ then Integer(token, 10)
187
+ when /\A-?\d+\.\d+\z/ then Float(token)
188
+ else token
189
+ end
190
+ end
191
+ private :arlington_scalar
192
+
173
193
  def arlington_version(field_def)
174
194
  field_def.since_version.to_s
175
195
  end
@@ -7,6 +7,7 @@ module Pdfrb
7
7
  # visual guide lines for page boxes (crop, bleed, trim, art) in
8
8
  # the viewer. Lives on Page /BoxColorInfo.
9
9
  class BoxColorInfo < Pdfrb::Model::Cos::Dictionary
10
+ arlington_object "BoxColorInfo"
10
11
  def crop_box_style; self[:CropBox]; end
11
12
  def bleed_box_style; self[:BleedBox]; end
12
13
  def trim_box_style; self[:TrimBox]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # CalGray color space dictionary (s8.6.3.2). Single-component
7
7
  # calibrated grayscale: [/CalGray <dict>].
8
8
  class CalGray < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "CalGrayDict"
9
10
  def white_point; self[:WhitePoint]; end
10
11
  def black_point; self[:BlackPoint]; end
11
12
  def gamma; self[:Gamma] || 1.0; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # CalRGB color space dictionary (s8.6.3.3). Calibrated RGB:
7
7
  # [/CalRGB <dict>].
8
8
  class CalRGB < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "CalRGBDict"
9
10
  def white_point; self[:WhitePoint]; end
10
11
  def black_point; self[:BlackPoint]; end
11
12
  def gamma; self[:Gamma]; end
@@ -0,0 +1,230 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pdfrb
4
+ module Model
5
+ module Type
6
+ # Array-form color spaces (s8.6). A color space is either a
7
+ # single /Name (device spaces) or an array [family *params]
8
+ # whose first element names the family.
9
+ class ColorSpace < Pdfrb::Model::PdfArray
10
+ def family; self[0]; end
11
+
12
+ def device?
13
+ size == 1
14
+ end
15
+
16
+ def based?
17
+ size > 1
18
+ end
19
+ end
20
+
21
+ # [/CalGray <dict>] (s8.6.3.2).
22
+ class CalGrayColorSpace < ColorSpace
23
+ arlington_object "CalGrayColorSpace"
24
+
25
+ def cal_gray_dict; self[1]; end
26
+
27
+ def gamma
28
+ cal_gray_dict && cal_gray_dict[:Gamma] ? cal_gray_dict[:Gamma] : 1.0
29
+ end
30
+ end
31
+
32
+ # [/CalRGB <dict>] (s8.6.3.3).
33
+ class CalRGBColorSpace < ColorSpace
34
+ arlington_object "CalRGBColorSpace"
35
+
36
+ def cal_rgb_dict; self[1]; end
37
+
38
+ def gamma
39
+ cal_rgb_dict && cal_rgb_dict[:Gamma]
40
+ end
41
+ end
42
+
43
+ # [/Lab <dict>] (s8.6.3.4).
44
+ class LabColorSpace < ColorSpace
45
+ arlington_object "LabColorSpace"
46
+
47
+ def lab_dict; self[1]; end
48
+
49
+ def range
50
+ lab_dict && lab_dict[:Range]
51
+ end
52
+ end
53
+
54
+ # [/DeviceGray] etc. (s8.6.4). Single-name device spaces.
55
+ class DeviceGrayColorSpace < ColorSpace
56
+ arlington_object "DeviceGrayColorSpace"
57
+
58
+ def components; 1; end
59
+ end
60
+
61
+ class DeviceRGBColorSpace < ColorSpace
62
+ arlington_object "DeviceRGBColorSpace"
63
+
64
+ def components; 3; end
65
+ end
66
+
67
+ class DeviceCMYKColorSpace < ColorSpace
68
+ arlington_object "DeviceCMYKColorSpace"
69
+
70
+ def components; 4; end
71
+ end
72
+
73
+ # [/ICCBased <stream>] (s8.6.5.5).
74
+ class ICCBasedColorSpaceArray < ColorSpace
75
+ arlington_object "ICCBasedColorSpace"
76
+
77
+ def profile_stream; self[1]; end
78
+
79
+ def profile_hash?
80
+ profile_stream.is_a?(Pdfrb::Model::Cos::Stream) ||
81
+ profile_stream.is_a?(::Hash)
82
+ end
83
+ private :profile_hash?
84
+
85
+ def components
86
+ profile_hash? ? profile_stream[:N] : nil
87
+ end
88
+
89
+ def alternate_space
90
+ profile_hash? ? profile_stream[:Alternate] : nil
91
+ end
92
+ end
93
+
94
+ # [/Indexed base hival lookup] (s8.6.6.3).
95
+ class IndexedColorSpace < ColorSpace
96
+ arlington_object "IndexedColorSpace"
97
+
98
+ def base; self[1]; end
99
+ def hival; self[2]; end
100
+ def lookup; self[3]; end
101
+
102
+ def components; 1; end
103
+
104
+ def lookup_length
105
+ data = lookup
106
+ return data.bytesize if data.is_a?(::String)
107
+
108
+ data.is_a?(Pdfrb::Model::Cos::Stream) ? nil : data&.size
109
+ end
110
+ end
111
+
112
+ # [/Separation name alternate tint] (s8.6.6.4).
113
+ class SeparationColorSpace < ColorSpace
114
+ arlington_object "SeparationColorSpace"
115
+
116
+ def colorant_name; self[1]; end
117
+ def alternate_space; self[2]; end
118
+ def tint_transform; self[3]; end
119
+
120
+ def components; 1; end
121
+ end
122
+
123
+ # [/DeviceN names alternate tint attrs] (s8.6.6.5).
124
+ class DeviceNColorSpace < ColorSpace
125
+ arlington_object "DeviceNColorSpace"
126
+
127
+ def colorant_names
128
+ names = self[1]
129
+ names.is_a?(Pdfrb::Model::PdfArray) ? names.to_a : names
130
+ end
131
+
132
+ def alternate_space; self[2]; end
133
+ def tint_transform; self[3]; end
134
+ def attributes; self[4]; end
135
+
136
+ def components
137
+ names = self[1]
138
+ return 1 unless names.is_a?(Pdfrb::Model::PdfArray) || names.is_a?(::Array)
139
+
140
+ names.size
141
+ end
142
+ end
143
+
144
+ # [/Pattern [base]] (s8.7.3.3). With a base space the pattern
145
+ # is a colored-with-tint (uncolored) pattern family.
146
+ class PatternColorSpace < ColorSpace
147
+ arlington_object "PatternColorSpace"
148
+
149
+ def base_space; self[1]; end
150
+
151
+ def uncolored?
152
+ !base_space.nil?
153
+ end
154
+ end
155
+
156
+ # Black point [X Y Z] inside CalGray/CalRGB/Lab dicts
157
+ # (s8.6.3.1).
158
+ class BlackpointArray < Pdfrb::Model::PdfArray
159
+ arlington_object "BlackpointArray"
160
+
161
+ def x; self[0]; end
162
+ def y; self[1]; end
163
+ def z; self[2]; end
164
+ end
165
+
166
+ # Resources /ColorSpace dictionary (s7.8.3). Maps resource
167
+ # names to color spaces; also carries the device-space
168
+ # defaults /DefaultGray, /DefaultRGB, /DefaultCMYK.
169
+ class ColorSpaceMap < Pdfrb::Model::Cos::Dictionary
170
+ arlington_object "ColorSpaceMap"
171
+
172
+ def [](name)
173
+ value[name.to_sym] || value[name.to_s]
174
+ end
175
+
176
+ def add(name, color_space)
177
+ value[name.to_sym] = color_space
178
+ name.to_sym
179
+ end
180
+
181
+ def default_gray; self[:DefaultGray]; end
182
+ def default_rgb; self[:DefaultRGB]; end
183
+ def default_cmyk; self[:DefaultCMYK]; end
184
+
185
+ def each_color_space(&)
186
+ return enum_for(:each_color_space) unless block_given?
187
+
188
+ value.each(&)
189
+ end
190
+
191
+ def names
192
+ value.keys
193
+ end
194
+ end
195
+
196
+ # Colorants dictionary (s8.6.6.5, DeviceN /Colorants). Maps
197
+ # individual colorant names to Separation spaces.
198
+ class ColorantsDict < Pdfrb::Model::Cos::Dictionary
199
+ arlington_object "ColorantsDict"
200
+
201
+ def [](name)
202
+ value[name.to_sym] || value[name.to_s]
203
+ end
204
+
205
+ def each_colorant(&)
206
+ return enum_for(:each_colorant) unless block_given?
207
+
208
+ value.each(&)
209
+ end
210
+
211
+ def colorant_names
212
+ value.keys
213
+ end
214
+ end
215
+
216
+ # Box style dictionary (s7.11.4, BoxColorInfo entries). Guides
217
+ # for the viewer's page-box display.
218
+ class BoxStyle < Pdfrb::Model::Cos::Dictionary
219
+ arlington_object "BoxStyle"
220
+
221
+ def color; self[:C]; end
222
+ def width; self[:W] || 1; end
223
+ def style; self[:S]&.to_sym || :S; end
224
+ def dash; self[:D]; end
225
+
226
+ def dashed?; style == :D; end
227
+ end
228
+ end
229
+ end
230
+ end
@@ -7,6 +7,7 @@ module Pdfrb
7
7
  # Maps +t+ ∈ [0,1] to C0 + (C1 - C0) * t^N.
8
8
  # Commonly used for 2-color linear gradients.
9
9
  class FunctionExponential < Function
10
+ arlington_object "FunctionType2"
10
11
  def c0; self[:C0]; end
11
12
  def c1; self[:C1]; end
12
13
  def exponent; self[:N] || 1; end
@@ -7,6 +7,7 @@ module Pdfrb
7
7
  # PostScript program in the stream payload that computes the
8
8
  # output values from input values.
9
9
  class FunctionPostScript < Pdfrb::Model::Cos::Stream
10
+ arlington_object "FunctionType4"
10
11
  def function_type; self[:FunctionType] || 4; end
11
12
 
12
13
  def domain; self[:Domain]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Type 0 Sampled function (s8.9.3). N-dimensional lookup table
7
7
  # with interpolation. Carries sample data in the stream payload.
8
8
  class FunctionSampled < Pdfrb::Model::Cos::Stream
9
+ arlington_object "FunctionType0"
9
10
  def function_type; self[:FunctionType] || 0; end
10
11
 
11
12
  def domain; self[:Domain]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Type 3 Stitching function (s8.9.5). Concatenates multiple
7
7
  # sub-functions over a stitched input domain.
8
8
  class FunctionStitching < Function
9
+ arlington_object "FunctionType3"
9
10
  def sub_functions; self[:Functions]; end
10
11
  def bounds; self[:Bounds]; end
11
12
  def encode; self[:Encode]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Type 1 halftone: a 1-bit tile sampled from a halftone screen
7
7
  # cell defined by frequency, angle, and spot function.
8
8
  class HalftoneType1 < Halftone
9
+ arlington_object "HalftoneType1"
9
10
  def frequency; self[:Frequency]; end
10
11
  def angle; self[:Angle]; end
11
12
  def spot_function; self[:SpotFunction]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Type 10 halftone: mesh-based continuous-tone (PDF 1.4+, mostly
7
7
  # used for non-square pixel grids).
8
8
  class HalftoneType10 < HalftoneType6
9
+ arlington_object "HalftoneType10"
9
10
  def xsquarestep; self[:Xsquarestep]; end
10
11
  def ysquarestep; self[:Ysquarestep]; end
11
12
  def center_x; self[:CenterX]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Type 16 halftone: more flexible mesh variant (PDF 1.4+).
7
7
  class HalftoneType16 < HalftoneType10
8
+ arlington_object "HalftoneType16"
8
9
  end
9
10
  end
10
11
  end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Type 5 halftone: a dictionary mapping colorant name → HalftoneType1.
7
7
  class HalftoneType5 < Halftone
8
+ arlington_object "HalftoneType5"
8
9
  def halftones; self[:Halftones]; end
9
10
  def default; self[:Default]; end
10
11
 
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Type 6 halftone: continuous-tone cell (PDF 1.4+).
7
7
  class HalftoneType6 < Halftone
8
+ arlington_object "HalftoneType6"
8
9
  def width; self[:Width]; end
9
10
  def height; self[:Height]; end
10
11
  def width2; self[:Width2]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # ICCBased Color Space (s8.6.5.5). Wrapper for the
7
7
  # [/ICCBased <stream-ref>] array form.
8
8
  class ICCBasedColorSpace < Pdfrb::Model::Cos::Stream
9
+ arlington_object "ICCProfileStream"
9
10
  def component_count; self[:N]; end
10
11
  def alternate; self[:Alternate]; end
11
12
  def range; self[:Range]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Lab color space dictionary (s8.6.3.4). CIE L*a*b*:
7
7
  # [/Lab <dict>].
8
8
  class Lab < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "LabDict"
9
10
  def white_point; self[:WhitePoint]; end
10
11
  def black_point; self[:BlackPoint]; end
11
12
  def range; self[:Range]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Media Offset Time (s13.3.6.5). Time-based media offset.
7
7
  class MediaOffsetTime < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "MediaOffsetTime"
8
9
  def subtype; self[:S]&.to_sym; end
9
10
  def timespan; self[:T]; end
10
11
 
@@ -17,6 +18,7 @@ module Pdfrb
17
18
 
18
19
  # Media Offset Frame (s13.3.6.5). Frame-based media offset.
19
20
  class MediaOffsetFrame < Pdfrb::Model::Cos::Dictionary
21
+ arlington_object "MediaOffsetFrame"
20
22
  def subtype; self[:S]&.to_sym; end
21
23
  def frame_number; self[:F]; end
22
24
  def time; self[:T]; end
@@ -28,6 +30,7 @@ module Pdfrb
28
30
 
29
31
  # Media Offset Marker (s13.3.6.5). Marker-based media offset.
30
32
  class MediaOffsetMarker < Pdfrb::Model::Cos::Dictionary
33
+ arlington_object "MediaOffsetMarker"
31
34
  def subtype; self[:S]&.to_sym; end
32
35
  def marker_name; self[:M]; end
33
36
  end
@@ -35,6 +38,7 @@ module Pdfrb
35
38
  # Media Player Info (s13.3.5.5). Identifies which players can
36
39
  # render the rendition.
37
40
  class MediaPlayerInfo < Pdfrb::Model::Cos::Dictionary
41
+ arlington_object "MediaPlayerInfo"
38
42
  def player_identifier; self[:PID]; end
39
43
  def must_honor; self[:MH]; end
40
44
  def best_effort; self[:BE]; end
@@ -53,6 +57,7 @@ module Pdfrb
53
57
 
54
58
  # Media Players (s13.3.5.5). Player info lists.
55
59
  class MediaPlayers < Pdfrb::Model::Cos::Dictionary
60
+ arlington_object "MediaPlayers"
56
61
  def must_use; self[:MU]; end
57
62
  def alternate; self[:A]; end
58
63
  def never_use; self[:NU]; end
@@ -75,6 +80,7 @@ module Pdfrb
75
80
  # Media Screen Parameters (s13.3.5.4). Controls how media is
76
81
  # displayed on the screen annotation.
77
82
  class MediaScreenParameters < Pdfrb::Model::Cos::Dictionary
83
+ arlington_object "MediaScreenParameters"
78
84
  def must_honor; self[:MH]; end
79
85
  def best_effort; self[:BE]; end
80
86
  def fit; self[:FIT]; end
@@ -88,6 +94,7 @@ module Pdfrb
88
94
 
89
95
  # Media Criteria (s13.3.5.5). Constraints when selecting players.
90
96
  class MediaCriteria < Pdfrb::Model::Cos::Dictionary
97
+ arlington_object "MediaCriteria"
91
98
  def must_honor; self[:MH]; end
92
99
  def best_effort; self[:BE]; end
93
100
  def bit_rate; self[:Rate]; end
@@ -27,6 +27,7 @@ module Pdfrb
27
27
  # Lab Range Array [a_min a_max b_min b_max]. Used inside the
28
28
  # Lab color space dict (s8.6.3.4).
29
29
  class LabRangeArray < Pdfrb::Model::PdfArray
30
+ arlington_object "LabRangeArray"
30
31
  def a_min; self[0]; end
31
32
  def a_max; self[1]; end
32
33
  def b_min; self[2]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # PageLabel (s12.4.2). Catalog /PageLabels /Nums entry. Defines
7
7
  # how page numbers are displayed in the viewer.
8
8
  class PageLabel < Cos::Dictionary
9
+ arlington_object "PageLabel"
9
10
  register_type :PageLabel
10
11
 
11
12
  def type; self[:Type]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Rich Media Activation (s13.6.1). Activation behaviour settings.
7
7
  class RichMediaActivation < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "RichMediaActivation"
8
9
  def type; self[:Type]; end
9
10
  def condition; self[:Condition]&.to_sym; end
10
11
  def configuration; self[:Configuration]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Rich Media Animation (s13.6.2). Playback control for
7
7
  # rich media instances.
8
8
  class RichMediaAnimation < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "RichMediaAnimation"
9
10
  def type; self[:Type]; end
10
11
  def subtype; self[:Subtype]&.to_sym; end
11
12
  def play_count; self[:PlayCount] || -1; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Rich Media Command (s13.6.4). A command sent to a rich media
7
7
  # instance.
8
8
  class RichMediaCommand < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "RichMediaCommand"
9
10
  def type; self[:Type]; end
10
11
  def command_name; self[:Cmd]; end
11
12
  def arguments; self[:Args]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Rich Media Configuration (s13.6.2). A media instance list.
7
7
  class RichMediaConfiguration < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "RichMediaConfiguration"
8
9
  def type; self[:Type]; end
9
10
  def instances; self[:Instances]; end
10
11
  def name; self[:Name]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Rich Media Content (s13.6.5). Top-level rich media assets bundle.
7
7
  class RichMediaContent < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "RichMediaContent"
8
9
  def type; self[:Type]; end
9
10
  def configurations; self[:Configurations]; end
10
11
  def assets; self[:Assets]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Rich Media Cue Point (s13.6.6). Time marker in a media playback.
7
7
  class RichMediaCuePoint < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "RichMediaCuePoint"
8
9
  def type; self[:Type]; end
9
10
  def time; self[:Time]; end
10
11
  def name; self[:Name]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Rich Media Deactivation (s13.6.1). Deactivation behaviour.
7
7
  class RichMediaDeactivation < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "RichMediaDeactivation"
8
9
  def type; self[:Type]; end
9
10
  def condition; self[:Condition]&.to_sym; end
10
11
 
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Rich Media Instance (s13.6.3). A single playable instance.
7
7
  class RichMediaInstance < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "RichMediaInstance"
8
9
  def type; self[:Type]; end
9
10
  def subtype; self[:Subtype]&.to_sym; end
10
11
  def media_clip; self[:Asset]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Rich Media Presentation (s13.6.1). Visual presentation settings
7
7
  # for a RichMedia annotation (style, window, transparency, etc.).
8
8
  class RichMediaPresentation < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "RichMediaPresentation"
9
10
  def type; self[:Type]; end
10
11
  def style; self[:Style]&.to_sym; end
11
12
  def window; self[:Window]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Rich Media Settings (s13.6.2). Top-level activation/deactivation
7
7
  # configuration for a RichMedia annotation.
8
8
  class RichMediaSettings < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "RichMediaSettings"
9
10
  def type; self[:Type]; end
10
11
  def activation; self[:Activation]; end
11
12
  def deactivation; self[:Deactivation]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Rich Media Window (s13.6.1). Window dimensions and position
7
7
  # for windowed rich media.
8
8
  class RichMediaWindow < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "RichMediaWindow"
9
10
  def type; self[:Type]; end
10
11
  def width; self[:Width]; end
11
12
  def height; self[:Height]; end
@@ -324,6 +324,24 @@ module Pdfrb
324
324
  autoload :DestinationDict, "pdfrb/model/type/destination"
325
325
  autoload :DestsMap, "pdfrb/model/type/destination"
326
326
 
327
+ # Array-form color spaces + maps (s8.6).
328
+ autoload :ColorSpace, "pdfrb/model/type/color_space"
329
+ autoload :CalGrayColorSpace, "pdfrb/model/type/color_space"
330
+ autoload :CalRGBColorSpace, "pdfrb/model/type/color_space"
331
+ autoload :LabColorSpace, "pdfrb/model/type/color_space"
332
+ autoload :DeviceGrayColorSpace, "pdfrb/model/type/color_space"
333
+ autoload :DeviceRGBColorSpace, "pdfrb/model/type/color_space"
334
+ autoload :DeviceCMYKColorSpace, "pdfrb/model/type/color_space"
335
+ autoload :ICCBasedColorSpaceArray, "pdfrb/model/type/color_space"
336
+ autoload :IndexedColorSpace, "pdfrb/model/type/color_space"
337
+ autoload :SeparationColorSpace, "pdfrb/model/type/color_space"
338
+ autoload :DeviceNColorSpace, "pdfrb/model/type/color_space"
339
+ autoload :PatternColorSpace, "pdfrb/model/type/color_space"
340
+ autoload :BlackpointArray, "pdfrb/model/type/color_space"
341
+ autoload :ColorSpaceMap, "pdfrb/model/type/color_space"
342
+ autoload :ColorantsDict, "pdfrb/model/type/color_space"
343
+ autoload :BoxStyle, "pdfrb/model/type/color_space"
344
+
327
345
  # Crypt filter (s7.6.5).
328
346
  autoload :CryptFilter, "pdfrb/model/type/crypt_filter"
329
347
  autoload :CryptFilterMap, "pdfrb/model/type/crypt_filter"
data/lib/pdfrb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pdfrb
4
- VERSION = "0.7.25"
4
+ VERSION = "0.7.27"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.25
4
+ version: 0.7.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-20 00:00:00.000000000 Z
11
+ date: 2026-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -1016,6 +1016,7 @@ files:
1016
1016
  - lib/pdfrb/model/type/collection_sort.rb
1017
1017
  - lib/pdfrb/model/type/collection_split.rb
1018
1018
  - lib/pdfrb/model/type/collection_subitem.rb
1019
+ - lib/pdfrb/model/type/color_space.rb
1019
1020
  - lib/pdfrb/model/type/crypt_filter.rb
1020
1021
  - lib/pdfrb/model/type/d_part.rb
1021
1022
  - lib/pdfrb/model/type/destination.rb