pdfrb 0.7.37 → 0.7.39
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.
- checksums.yaml +4 -4
- data/lib/pdfrb/conformance/ltv.rb +1 -2
- data/lib/pdfrb/conformance/pades.rb +1 -2
- data/lib/pdfrb/conformance/pdf_2_af.rb +1 -2
- data/lib/pdfrb/conformance/pdf_a4_deep.rb +1 -2
- data/lib/pdfrb/conformance/pdf_ua2_deep.rb +1 -2
- data/lib/pdfrb/conformance/pdf_ua_tagging_deep.rb +1 -2
- data/lib/pdfrb/conformance/pdf_vt.rb +1 -2
- data/lib/pdfrb/conformance/structure_elements.rb +1 -2
- data/lib/pdfrb/conformance/tagged_pdf.rb +1 -2
- data/lib/pdfrb/font/true_type/subsetter.rb +1 -2
- data/lib/pdfrb/model/cos/fields.rb +1 -1
- data/lib/pdfrb/model/rectangle.rb +4 -4
- data/lib/pdfrb/model/type/bead.rb +8 -0
- data/lib/pdfrb/model/type/misc_extras.rb +268 -0
- data/lib/pdfrb/model/type/misc_helpers.rb +15 -0
- data/lib/pdfrb/model/type/movie.rb +14 -0
- data/lib/pdfrb/model/type/opt_content_ext.rb +15 -0
- data/lib/pdfrb/model/type/printer_mark_annotation.rb +10 -0
- data/lib/pdfrb/model/type/projection_annotation.rb +1 -0
- data/lib/pdfrb/model/type/three_d_view.rb +14 -0
- data/lib/pdfrb/model/type.rb +32 -0
- data/lib/pdfrb/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6cfbdc62ced73caae69a35fbeda0696c91e59034d7150061074984aeaf5774fc
|
|
4
|
+
data.tar.gz: a0763ab8ddb7f86bc80f5d42163dbbce0c6de0d0b7bb505bdd9359dbceffa694
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ac73666c5e342b1d71765514b5207adeb1841a4ba72109f3825515d67f0de7a5732ee7b5f234c5d47b7895684268060cf95bd7ecd82d734e57c6a1439ac6d30
|
|
7
|
+
data.tar.gz: fef9bd2763466355adee7b2daf241cd9bf937f177af65f2f8f986a0df7ea10c25468084ef276b4e7843efa1552f146094198518ed74edab4e95d99e7e670d55a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# Long-Term Validation (LTV) per ETSI EN 319 102-1 Annex B. LTV
|
|
@@ -109,4 +109,3 @@ module Pdfrb
|
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# PAdES (ETSI EN 319 142-1) signature profile validation. Four
|
|
@@ -195,4 +195,3 @@ module Pdfrb
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
end
|
|
198
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# PDF 2.0 Associated Files (AF) validation per Application Note
|
|
@@ -182,4 +182,3 @@ module Pdfrb
|
|
|
182
182
|
end
|
|
183
183
|
end
|
|
184
184
|
end
|
|
185
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# PDF/A-4 deep checks (ISO 19005-4). Builds on the SHARED + A4
|
|
@@ -91,4 +91,3 @@ module Pdfrb
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
end
|
|
94
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# PDF/UA-2 (ISO 14289-2) deep checks. PDF/UA-2 is rooted in
|
|
@@ -90,4 +90,3 @@ module Pdfrb
|
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# PDF/UA-1 deep tagging checks (ISO 14289-1 §7). Extends the
|
|
@@ -122,4 +122,3 @@ module Pdfrb
|
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# PDF/VT conformance per ISO 16612-2. PDF/VT is the variable
|
|
@@ -125,4 +125,3 @@ module Pdfrb
|
|
|
125
125
|
end
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -78,7 +78,7 @@ module Pdfrb
|
|
|
78
78
|
|
|
79
79
|
private
|
|
80
80
|
|
|
81
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/BlockLength
|
|
81
|
+
# rubocop:disable-next Metrics/MethodLength, Metrics/AbcSize, Metrics/BlockLength
|
|
82
82
|
def check_structure(document, elem, violations, depth = 0)
|
|
83
83
|
return if depth > 20
|
|
84
84
|
|
|
@@ -149,7 +149,6 @@ module Pdfrb
|
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
end
|
|
152
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/BlockLength
|
|
153
152
|
|
|
154
153
|
def resolve_role_map(document, type)
|
|
155
154
|
root_ref = document.catalog[:StructTreeRoot]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/BlockLength
|
|
3
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
4
4
|
module Pdfrb
|
|
5
5
|
module Conformance
|
|
6
6
|
# Tagged PDF validation per ISO 32000-1 §14.8 (and ISO 32000-2
|
|
@@ -179,4 +179,3 @@ module Pdfrb
|
|
|
179
179
|
end
|
|
180
180
|
end
|
|
181
181
|
end
|
|
182
|
-
# rubocop:enable Metrics/BlockLength
|
|
@@ -311,7 +311,7 @@ module Pdfrb
|
|
|
311
311
|
end
|
|
312
312
|
end
|
|
313
313
|
|
|
314
|
-
# rubocop:disable Metrics/MethodLength
|
|
314
|
+
# rubocop:disable-next Metrics/MethodLength
|
|
315
315
|
def assemble_ttf(tables)
|
|
316
316
|
checksum_placeholder = [0].pack("N")
|
|
317
317
|
num = tables.length
|
|
@@ -366,7 +366,6 @@ module Pdfrb
|
|
|
366
366
|
|
|
367
367
|
out.force_encoding(Encoding::BINARY)
|
|
368
368
|
end
|
|
369
|
-
# rubocop:enable Metrics/MethodLength
|
|
370
369
|
|
|
371
370
|
# rubocop:disable Naming/MethodName
|
|
372
371
|
# ---- Binary helpers ----
|
|
@@ -23,12 +23,12 @@ module Pdfrb
|
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def width;
|
|
26
|
+
def width; @urx - @llx; end
|
|
27
27
|
def height; @ury - @lly; end
|
|
28
|
-
def left;
|
|
28
|
+
def left; @llx; end
|
|
29
29
|
def bottom; @lly; end
|
|
30
|
-
def right;
|
|
31
|
-
def top;
|
|
30
|
+
def right; @urx; end
|
|
31
|
+
def top; @ury; end
|
|
32
32
|
|
|
33
33
|
def origin; [@llx, @lly]; end
|
|
34
34
|
def corner; [@urx, @ury]; end
|
|
@@ -51,6 +51,14 @@ module Pdfrb
|
|
|
51
51
|
value[:R]
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
|
+
|
|
55
|
+
# First-bead variant (s7.10.2): the bead that starts a thread;
|
|
56
|
+
# carries the thread /T reference.
|
|
57
|
+
class BeadFirst < Bead
|
|
58
|
+
arlington_object "BeadFirst"
|
|
59
|
+
|
|
60
|
+
def thread; self[:T]; end
|
|
61
|
+
end
|
|
54
62
|
end
|
|
55
63
|
end
|
|
56
64
|
end
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# Encrypted payload dictionary (s7.11.4.1, /Encrypt on an
|
|
7
|
+
# embedded file's /EF entry): identifies the encryption applied
|
|
8
|
+
# to the file's bytes.
|
|
9
|
+
class EncryptedPayload < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "EncryptedPayload"
|
|
11
|
+
|
|
12
|
+
def type; self[:Type]; end
|
|
13
|
+
def subtype; self[:Subtype]; end
|
|
14
|
+
def version; self[:Version]; end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Permissions dictionary (s12.8.4): signature-transform
|
|
18
|
+
# permissions for /DocMDP and /UR3 entries.
|
|
19
|
+
class Permissions < Pdfrb::Model::Cos::Dictionary
|
|
20
|
+
arlington_object "Permissions"
|
|
21
|
+
|
|
22
|
+
def doc_mdp; self[:DocMDP]; end
|
|
23
|
+
def ur3; self[:UR3]; end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# FDF dictionary (s12.7.8, /FDF): form-data root inside an FDF
|
|
27
|
+
# file. Keys vary by tool; the map is open.
|
|
28
|
+
class FDDict < Pdfrb::Model::Cos::Dictionary
|
|
29
|
+
arlington_object "FDDict"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Base stream dictionary (s7.3.8.2, /Length /Filter ...):
|
|
33
|
+
# applied to every stream that carries no more specific Type.
|
|
34
|
+
class StreamDict < Pdfrb::Model::Cos::Dictionary
|
|
35
|
+
arlington_object "Stream"
|
|
36
|
+
|
|
37
|
+
def length; self[:Length]; end
|
|
38
|
+
def filter; self[:Filter]; end
|
|
39
|
+
def decode_parms; self[:DecodeParms]; end
|
|
40
|
+
def file_spec; self[:F]; end
|
|
41
|
+
def file_filter; self[:FFilter]; end
|
|
42
|
+
def file_decode_parms; self[:FDecodeParms]; end
|
|
43
|
+
def dl; self[:DL]; end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Dictionary of dictionaries (Arlington helper): wildcard map
|
|
47
|
+
# whose values are dictionaries.
|
|
48
|
+
class DictionaryOfDictionaries < Pdfrb::Model::Cos::Dictionary
|
|
49
|
+
arlington_object "DictionaryOfDictionaries"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Dictionary of functions (s10.4, stitching /Functions entry):
|
|
53
|
+
# wildcard map of name -> function.
|
|
54
|
+
class DictionaryOfFunctions < Pdfrb::Model::Cos::Dictionary
|
|
55
|
+
arlington_object "DictionaryOfFunctions"
|
|
56
|
+
|
|
57
|
+
def default_function; self[:Default]; end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Linearization parameter dictionary (s7.5.8.2, first-page
|
|
61
|
+
# object /Linearized dict).
|
|
62
|
+
class LinearizationParameterDict < Pdfrb::Model::Cos::Dictionary
|
|
63
|
+
arlington_object "LinearizationParameterDict"
|
|
64
|
+
|
|
65
|
+
def linearized; self[:Linearized]; end
|
|
66
|
+
def file_length; self[:L]; end
|
|
67
|
+
def first_page_offset; self[:H]; end
|
|
68
|
+
def offset_of_first_page_end; self[:O]; end
|
|
69
|
+
def offset_of_last_page_end; self[:E]; end
|
|
70
|
+
def page_count; self[:N]; end
|
|
71
|
+
def xref_table_offset; self[:T]; end
|
|
72
|
+
def offset_of_main_xref; self[:P]; end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Fixed-print dictionary (s12.7.4.5.4, /AP /FixedPrint):
|
|
76
|
+
# watermark placement and scaling.
|
|
77
|
+
class FixedPrint < Pdfrb::Model::Cos::Dictionary
|
|
78
|
+
arlington_object "FixedPrint"
|
|
79
|
+
|
|
80
|
+
def type; self[:Type]; end
|
|
81
|
+
def matrix; self[:Matrix]; end
|
|
82
|
+
def horizontal_adjustment; self[:H]; end
|
|
83
|
+
def vertical_adjustment; self[:V]; end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Floating-window parameters (s13.2.2 media /F): presentation
|
|
87
|
+
# mode with duration, opacity, and resize behaviour.
|
|
88
|
+
class FloatingWindowParameters < Pdfrb::Model::Cos::Dictionary
|
|
89
|
+
arlington_object "FloatingWindowParameters"
|
|
90
|
+
|
|
91
|
+
def type; self[:Type]; end
|
|
92
|
+
def default_visible; self[:D]; end
|
|
93
|
+
def resize_type; self[:RT]; end
|
|
94
|
+
def has_title_bar?; self[:P]; end
|
|
95
|
+
def has_close_button?; self[:O]; end
|
|
96
|
+
def title; self[:T]; end
|
|
97
|
+
def ui_constrained?; self[:UC]; end
|
|
98
|
+
|
|
99
|
+
# /R defaults to 0 (not resizable) via the TSV.
|
|
100
|
+
def resizable?
|
|
101
|
+
!self[:R].nil? && self[:R] != 0 && self[:R] != false
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# FontFileType1 (s9.6.6.2): the Type 1 /FontFile stream keys.
|
|
106
|
+
class FontFileType1 < Pdfrb::Model::Cos::Stream
|
|
107
|
+
arlington_object "FontFileType1"
|
|
108
|
+
|
|
109
|
+
def clear_text_length; self[:Length1]; end
|
|
110
|
+
def encrypted_length; self[:Length2]; end
|
|
111
|
+
def trailer_length; self[:Length3]; end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Mac OS file descriptor (s7.11.4.5, /Mac): resource-fork and
|
|
115
|
+
# creator info for platform-specific embedding.
|
|
116
|
+
class Mac < Pdfrb::Model::Cos::Dictionary
|
|
117
|
+
arlington_object "Mac"
|
|
118
|
+
|
|
119
|
+
def subtype; self[:Subtype]; end
|
|
120
|
+
def creator; self[:Creator]; end
|
|
121
|
+
def res_fork; self[:ResFork]; end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Windows launch parameter dictionary (s12.6.4.6, /Win): the
|
|
125
|
+
# Windows half of a /Launch action.
|
|
126
|
+
class MicrosoftWindowsLaunchParam < Pdfrb::Model::Cos::Dictionary
|
|
127
|
+
arlington_object "MicrosoftWindowsLaunchParam"
|
|
128
|
+
|
|
129
|
+
def file; self[:F]; end
|
|
130
|
+
def default_directory; self[:D]; end
|
|
131
|
+
def operation; self[:O]; end
|
|
132
|
+
def parameters; self[:P]; end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Minimum bit depth (s13.2 media criteria /D /Bits): colour
|
|
136
|
+
# depth the viewer must support.
|
|
137
|
+
class MinimumBitDepth < Pdfrb::Model::Cos::Dictionary
|
|
138
|
+
arlington_object "MinimumBitDepth"
|
|
139
|
+
|
|
140
|
+
def type; self[:Type]; end
|
|
141
|
+
def value; self[:V]; end
|
|
142
|
+
def minimum_screen; self[:M]; end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Minimum screen size (s13.2 media criteria /D /Sys).
|
|
146
|
+
class MinimumScreenSize < Pdfrb::Model::Cos::Dictionary
|
|
147
|
+
arlington_object "MinimumScreenSize"
|
|
148
|
+
|
|
149
|
+
def type; self[:Type]; end
|
|
150
|
+
def value; self[:V]; end
|
|
151
|
+
def minimum_screen; self[:M]; end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Navigator node (s7.11.5.2, collections /NavNode): one node
|
|
155
|
+
# in a portfolio navigation flow.
|
|
156
|
+
class NavNode < Pdfrb::Model::Cos::Dictionary
|
|
157
|
+
arlington_object "NavNode"
|
|
158
|
+
|
|
159
|
+
def type; self[:Type]; end
|
|
160
|
+
def next_action; self[:NA]; end
|
|
161
|
+
def previous_action; self[:PA]; end
|
|
162
|
+
def next_node; self[:Next]; end
|
|
163
|
+
def previous_node; self[:Prev]; end
|
|
164
|
+
def duration; self[:Dur]; end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Navigator (s7.11.5.2, collections /Navigator): a Flash or
|
|
168
|
+
# static layout describing portfolio navigation.
|
|
169
|
+
class Navigator < Pdfrb::Model::Cos::Dictionary
|
|
170
|
+
arlington_object "Navigator"
|
|
171
|
+
|
|
172
|
+
def type; self[:Type]; end
|
|
173
|
+
def layout; self[:Layout]; end
|
|
174
|
+
def flash; self[:SWF]; end
|
|
175
|
+
def name; self[:Name]; end
|
|
176
|
+
def description; self[:Desc]; end
|
|
177
|
+
def category; self[:Category]; end
|
|
178
|
+
def id; self[:ID]; end
|
|
179
|
+
def version; self[:Version]; end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Paper metadata (s7.11.5.3, /Paper): barcode/paper-form data.
|
|
183
|
+
class PaperMetaData < Pdfrb::Model::Cos::Dictionary
|
|
184
|
+
arlington_object "PaperMetaData"
|
|
185
|
+
|
|
186
|
+
def type; self[:Type]; end
|
|
187
|
+
def version; self[:Version]; end
|
|
188
|
+
def resolution; self[:Resolution]; end
|
|
189
|
+
def caption; self[:Caption]; end
|
|
190
|
+
def symbology; self[:Symbology]; end
|
|
191
|
+
def width; self[:Width]; end
|
|
192
|
+
def height; self[:Height]; end
|
|
193
|
+
def xsym_width; self[:XSymWidth]; end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Slide-show dictionary (s13.5.2, /SlideShow): a sequence of
|
|
197
|
+
# pages or resources for presentation mode.
|
|
198
|
+
class SlideShow < Pdfrb::Model::Cos::Dictionary
|
|
199
|
+
arlington_object "SlideShow"
|
|
200
|
+
|
|
201
|
+
def type; self[:Type]; end
|
|
202
|
+
def subtype; self[:Subtype]; end
|
|
203
|
+
def resources; self[:Resources]; end
|
|
204
|
+
def start_resource; self[:StartResource]; end
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Solidities map (DeviceN /MixingHints /Solidities):
|
|
208
|
+
# colorant name -> ink solidity percentage.
|
|
209
|
+
class Solidities < Pdfrb::Model::Cos::Dictionary
|
|
210
|
+
arlington_object "Solidities"
|
|
211
|
+
|
|
212
|
+
def [](colorant)
|
|
213
|
+
value[colorant.to_sym] || value[colorant.to_s]
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def colorant_names
|
|
217
|
+
value.keys
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Source information (s14.10.2, /SourceInfo): provenance for
|
|
222
|
+
# structure elements.
|
|
223
|
+
class SourceInformation < Pdfrb::Model::Cos::Dictionary
|
|
224
|
+
arlington_object "SourceInformation"
|
|
225
|
+
|
|
226
|
+
def author; self[:AU]; end
|
|
227
|
+
def timestamp; self[:TS]; end
|
|
228
|
+
def engine; self[:E]; end
|
|
229
|
+
def description; self[:S]; end
|
|
230
|
+
def color; self[:C]; end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Spectral data (DeviceN /Subtype /NChannel colorants):
|
|
234
|
+
# per-colorant spectral measurement maps.
|
|
235
|
+
class SpectralData < Pdfrb::Model::Cos::Dictionary
|
|
236
|
+
arlington_object "SpectralData"
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# View parameters (s13.6.2.4, 3D /VA array entries): per-frame
|
|
240
|
+
# view + animation data.
|
|
241
|
+
class ViewParams < Pdfrb::Model::Cos::Dictionary
|
|
242
|
+
arlington_object "ViewParams"
|
|
243
|
+
|
|
244
|
+
def instance; self[:Instance]; end
|
|
245
|
+
def data; self[:Data]; end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# DPM metadata stream dictionary (PDF 2.0 App Note 003,
|
|
249
|
+
# /Type /Metadata /Subtype /DPM): document-part metadata.
|
|
250
|
+
class DPMMetadataStream < Pdfrb::Model::Cos::Dictionary
|
|
251
|
+
arlington_object "DPM"
|
|
252
|
+
|
|
253
|
+
def gts_managed; self[:GTS_Managed]; end
|
|
254
|
+
def gts_suspect; self[:GTS_Suspect]; end
|
|
255
|
+
def cip4_root; self[:CIP4_Root]; end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Private data dictionary (s14.10 /Data): application-private
|
|
259
|
+
# provenance payloads.
|
|
260
|
+
class Data < Pdfrb::Model::Cos::Dictionary
|
|
261
|
+
arlington_object "Data"
|
|
262
|
+
|
|
263
|
+
def last_modified; self[:LastModified]; end
|
|
264
|
+
def private_data; self[:Private]; end
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
@@ -46,6 +46,20 @@ module Pdfrb
|
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
# Dest output profile dictionary (s7.9.6): the dictionary a
|
|
50
|
+
# DestOutputProfileRef points at. Carries ICC metadata and the
|
|
51
|
+
# colorant table for PDF/X output intent profiles.
|
|
52
|
+
class DestOutputProfile < Pdfrb::Model::Cos::Dictionary
|
|
53
|
+
arlington_object "DestOutputProfileRef"
|
|
54
|
+
|
|
55
|
+
def checksum; self[:CheckSum]; end
|
|
56
|
+
def colorant_table; self[:ColorantTable]; end
|
|
57
|
+
def icc_version; self[:ICCVersion]; end
|
|
58
|
+
def profile_color_space; self[:ProfileCS]; end
|
|
59
|
+
def profile_name; self[:ProfileName]; end
|
|
60
|
+
def urls; self[:URLs]; end
|
|
61
|
+
end
|
|
62
|
+
|
|
49
63
|
# Output Intents array (s14.11.5). Container for the Catalog
|
|
50
64
|
# /OutputIntents array — convenience wrapper that just forwards
|
|
51
65
|
# to the type.
|
|
@@ -63,6 +77,7 @@ module Pdfrb
|
|
|
63
77
|
|
|
64
78
|
# CMapStream (s9.7.5.3). CMap stream definition embedded in a PDF.
|
|
65
79
|
class CMapStream < Pdfrb::Model::Cos::Stream
|
|
80
|
+
arlington_object "CMapStream"
|
|
66
81
|
def type; self[:Type]; end
|
|
67
82
|
def base_font; self[:BaseFont]; end
|
|
68
83
|
def encoding; self[:Encoding]; end
|
|
@@ -24,6 +24,20 @@ module Pdfrb
|
|
|
24
24
|
document.object(ref)
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
# Movie activation dictionary (s12.5.6.14, /A): playback
|
|
29
|
+
# parameters for a movie annotation.
|
|
30
|
+
class MovieActivation < Pdfrb::Model::Cos::Dictionary
|
|
31
|
+
arlington_object "MovieActivation"
|
|
32
|
+
|
|
33
|
+
def start; self[:Start]; end
|
|
34
|
+
def duration; self[:Duration]; end
|
|
35
|
+
def rate; self[:Rate]; end
|
|
36
|
+
def volume; self[:Volume]; end
|
|
37
|
+
def show_controls; self[:ShowControls]; end
|
|
38
|
+
def synchronous; self[:Synchronous]; end
|
|
39
|
+
def fw_scale; self[:FWScale]; end
|
|
40
|
+
end
|
|
27
41
|
end
|
|
28
42
|
end
|
|
29
43
|
end
|
|
@@ -111,6 +111,21 @@ module Pdfrb
|
|
|
111
111
|
def min; self[:min]; end
|
|
112
112
|
def max; self[:max]; end
|
|
113
113
|
end
|
|
114
|
+
|
|
115
|
+
# OCG /Usage dictionary (s8.11.4.4): wraps the per-context
|
|
116
|
+
# visibility entries.
|
|
117
|
+
class OptContentUsage < Pdfrb::Model::Cos::Dictionary
|
|
118
|
+
arlington_object "OptContentUsage"
|
|
119
|
+
|
|
120
|
+
def creator_info; self[:CreatorInfo]; end
|
|
121
|
+
def language; self[:Language]; end
|
|
122
|
+
def export; self[:Export]; end
|
|
123
|
+
def zoom; self[:Zoom]; end
|
|
124
|
+
def print; self[:Print]; end
|
|
125
|
+
def view; self[:View]; end
|
|
126
|
+
def user; self[:User]; end
|
|
127
|
+
def page_element; self[:PageElement]; end
|
|
128
|
+
end
|
|
114
129
|
end
|
|
115
130
|
end
|
|
116
131
|
end
|
|
@@ -9,6 +9,16 @@ module Pdfrb
|
|
|
9
9
|
arlington_object "AnnotPrinterMark"
|
|
10
10
|
def mark_subtype; self[:MN]; end
|
|
11
11
|
end
|
|
12
|
+
|
|
13
|
+
# PrinterMark appearance dictionary (s14.11.4): N/R/D states
|
|
14
|
+
# mapping to appearance streams.
|
|
15
|
+
class AppearancePrinterMarkDict < Pdfrb::Model::Cos::Dictionary
|
|
16
|
+
arlington_object "AppearancePrinterMark"
|
|
17
|
+
|
|
18
|
+
def normal; self[:N]; end
|
|
19
|
+
def rollover; self[:R]; end
|
|
20
|
+
def down; self[:D]; end
|
|
21
|
+
end
|
|
12
22
|
end
|
|
13
23
|
end
|
|
14
24
|
end
|
|
@@ -32,6 +32,7 @@ module Pdfrb
|
|
|
32
32
|
# ExData Projection dict (s12.5.6.21, Table 198). Holds the
|
|
33
33
|
# geospatial projection details used by Projection annotations.
|
|
34
34
|
class ExDataProjection < Pdfrb::Model::Cos::Dictionary
|
|
35
|
+
arlington_object "ExDataProjection"
|
|
35
36
|
def type; self[:Type]; end
|
|
36
37
|
|
|
37
38
|
def project?
|
|
@@ -36,6 +36,20 @@ module Pdfrb
|
|
|
36
36
|
document.object(ref)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
|
+
|
|
40
|
+
# 3DViewAddEntries (s13.6.2.8): extra keys a 3D view adds to
|
|
41
|
+
# the base view dictionary.
|
|
42
|
+
class ThreeDViewAddEntries < Pdfrb::Model::Cos::Dictionary
|
|
43
|
+
arlington_object "3DViewAddEntries"
|
|
44
|
+
|
|
45
|
+
def external_name; self[:XN]; end
|
|
46
|
+
def internal_name; self[:IN]; end
|
|
47
|
+
def background; self[:MS]; end
|
|
48
|
+
def matrix; self[:MA]; end
|
|
49
|
+
def camera_to_world; self[:C2W]; end
|
|
50
|
+
def u3d_path; self[:U3DPath]; end
|
|
51
|
+
def lighting_scheme; self[:CO]; end
|
|
52
|
+
end
|
|
39
53
|
end
|
|
40
54
|
end
|
|
41
55
|
end
|
data/lib/pdfrb/model/type.rb
CHANGED
|
@@ -357,6 +357,7 @@ module Pdfrb
|
|
|
357
357
|
autoload :BorderArray, "pdfrb/model/type/misc_helpers"
|
|
358
358
|
autoload :LabRangeArray, "pdfrb/model/type/misc_helpers"
|
|
359
359
|
autoload :DestOutputProfileRef, "pdfrb/model/type/misc_helpers"
|
|
360
|
+
autoload :DestOutputProfile, "pdfrb/model/type/misc_helpers"
|
|
360
361
|
autoload :OutputIntentsContainer, "pdfrb/model/type/misc_helpers"
|
|
361
362
|
autoload :CMapStream, "pdfrb/model/type/misc_helpers"
|
|
362
363
|
autoload :GammaArray, "pdfrb/model/type/misc_helpers"
|
|
@@ -525,6 +526,37 @@ module Pdfrb
|
|
|
525
526
|
autoload :AddActionScreenAnnotation, "pdfrb/model/type/add_action_screen_annotation"
|
|
526
527
|
autoload :AddActionWidgetAnnotation, "pdfrb/model/type/add_action_widget_annotation"
|
|
527
528
|
|
|
529
|
+
# Final misc tail (streams, launches, media criteria, provenance).
|
|
530
|
+
autoload :EncryptedPayload, "pdfrb/model/type/misc_extras"
|
|
531
|
+
autoload :Permissions, "pdfrb/model/type/misc_extras"
|
|
532
|
+
autoload :FDDict, "pdfrb/model/type/misc_extras"
|
|
533
|
+
autoload :StreamDict, "pdfrb/model/type/misc_extras"
|
|
534
|
+
autoload :DictionaryOfDictionaries, "pdfrb/model/type/misc_extras"
|
|
535
|
+
autoload :DictionaryOfFunctions, "pdfrb/model/type/misc_extras"
|
|
536
|
+
autoload :LinearizationParameterDict, "pdfrb/model/type/misc_extras"
|
|
537
|
+
autoload :FixedPrint, "pdfrb/model/type/misc_extras"
|
|
538
|
+
autoload :FloatingWindowParameters, "pdfrb/model/type/misc_extras"
|
|
539
|
+
autoload :FontFileType1, "pdfrb/model/type/misc_extras"
|
|
540
|
+
autoload :Mac, "pdfrb/model/type/misc_extras"
|
|
541
|
+
autoload :MicrosoftWindowsLaunchParam, "pdfrb/model/type/misc_extras"
|
|
542
|
+
autoload :MinimumBitDepth, "pdfrb/model/type/misc_extras"
|
|
543
|
+
autoload :MinimumScreenSize, "pdfrb/model/type/misc_extras"
|
|
544
|
+
autoload :NavNode, "pdfrb/model/type/misc_extras"
|
|
545
|
+
autoload :Navigator, "pdfrb/model/type/misc_extras"
|
|
546
|
+
autoload :PaperMetaData, "pdfrb/model/type/misc_extras"
|
|
547
|
+
autoload :SlideShow, "pdfrb/model/type/misc_extras"
|
|
548
|
+
autoload :Solidities, "pdfrb/model/type/misc_extras"
|
|
549
|
+
autoload :SourceInformation, "pdfrb/model/type/misc_extras"
|
|
550
|
+
autoload :SpectralData, "pdfrb/model/type/misc_extras"
|
|
551
|
+
autoload :ViewParams, "pdfrb/model/type/misc_extras"
|
|
552
|
+
autoload :DPMMetadataStream, "pdfrb/model/type/misc_extras"
|
|
553
|
+
autoload :Data, "pdfrb/model/type/misc_extras"
|
|
554
|
+
autoload :BeadFirst, "pdfrb/model/type/bead"
|
|
555
|
+
autoload :ThreeDViewAddEntries, "pdfrb/model/type/three_d_view"
|
|
556
|
+
autoload :MovieActivation, "pdfrb/model/type/movie"
|
|
557
|
+
autoload :AppearancePrinterMarkDict, "pdfrb/model/type/printer_mark_annotation"
|
|
558
|
+
autoload :OptContentUsage, "pdfrb/model/type/opt_content_ext"
|
|
559
|
+
|
|
528
560
|
# Signature/certification extras + targets + extensions.
|
|
529
561
|
autoload :CertSeedValue, "pdfrb/model/type/signature_extras"
|
|
530
562
|
autoload :SubjectDN, "pdfrb/model/type/signature_extras"
|
data/lib/pdfrb/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pdfrb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -1090,6 +1090,7 @@ files:
|
|
|
1090
1090
|
- lib/pdfrb/model/type/media_clip.rb
|
|
1091
1091
|
- lib/pdfrb/model/type/media_offset.rb
|
|
1092
1092
|
- lib/pdfrb/model/type/metadata.rb
|
|
1093
|
+
- lib/pdfrb/model/type/misc_extras.rb
|
|
1093
1094
|
- lib/pdfrb/model/type/misc_helpers.rb
|
|
1094
1095
|
- lib/pdfrb/model/type/movie.rb
|
|
1095
1096
|
- lib/pdfrb/model/type/movie_annotation.rb
|