pdfrb 0.7.26 → 0.7.28
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/model/type/cid_font_descriptor_metrics.rb +1 -0
- data/lib/pdfrb/model/type/doc_mdp_transform_parameters.rb +1 -0
- data/lib/pdfrb/model/type/field_mdp_transform_parameters.rb +1 -0
- data/lib/pdfrb/model/type/font_cid_type0.rb +1 -0
- data/lib/pdfrb/model/type/font_cid_type2.rb +1 -0
- data/lib/pdfrb/model/type/font_descriptor_cid_type0.rb +1 -0
- data/lib/pdfrb/model/type/font_descriptor_cid_type2.rb +1 -0
- data/lib/pdfrb/model/type/font_encoding.rb +1 -0
- data/lib/pdfrb/model/type/font_file.rb +1 -0
- data/lib/pdfrb/model/type/font_file2.rb +1 -0
- data/lib/pdfrb/model/type/font_multiple_master.rb +2 -0
- data/lib/pdfrb/model/type/function_exponential.rb +1 -0
- data/lib/pdfrb/model/type/function_postscript.rb +1 -0
- data/lib/pdfrb/model/type/function_sampled.rb +1 -0
- data/lib/pdfrb/model/type/function_stitching.rb +1 -0
- data/lib/pdfrb/model/type/halftone_type1.rb +1 -0
- data/lib/pdfrb/model/type/halftone_type10.rb +1 -0
- data/lib/pdfrb/model/type/halftone_type16.rb +1 -0
- data/lib/pdfrb/model/type/halftone_type5.rb +1 -0
- data/lib/pdfrb/model/type/halftone_type6.rb +1 -0
- data/lib/pdfrb/model/type/mdp_dict.rb +1 -0
- data/lib/pdfrb/model/type/media_offset.rb +7 -0
- data/lib/pdfrb/model/type/rich_media_activation.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_animation.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_command.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_configuration.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_content.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_cue_point.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_deactivation.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_instance.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_presentation.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_settings.rb +1 -0
- data/lib/pdfrb/model/type/rich_media_window.rb +1 -0
- data/lib/pdfrb/model/type/sig_field_lock.rb +1 -0
- data/lib/pdfrb/model/type/sig_field_seed_value.rb +1 -0
- data/lib/pdfrb/model/type/signature.rb +4 -1
- data/lib/pdfrb/model/type/signature_build.rb +7 -0
- data/lib/pdfrb/model/type/to_unicode_cmap_stream.rb +1 -0
- data/lib/pdfrb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25c630de168e6133c0d6c4609497b0597b5c49f0d53aab6f7d3d5a4eccabd590
|
|
4
|
+
data.tar.gz: 45b3b1b3282360ed16de7def80637d4971355186c3ad73c1b3f1e692b8f980bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0e3341af81cbae71287d50d5b012f44f80fceb835019a052d50b8cf87d668ec7afd777dce003016dea285c920f18fc52bc703dae29cd01e3479bea6d631dda5
|
|
7
|
+
data.tar.gz: a3a270489cca673f4ef25ea3c874776373b8aa516f5ce7c5163194d976a86fa1305d9fcfe22412838d5ed2119af2f15010c2b008bc0b36a1d0d811236db83339
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# CID Font Descriptor Metrics (s9.8.1, Table 117). Per-CIDFont
|
|
7
7
|
# metrics used for embedded CIDFontType0/CIDFontType2.
|
|
8
8
|
class CIDFontDescriptorMetrics < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "CIDFontDescriptorMetrics"
|
|
9
10
|
def style; self[:Style]&.to_sym; end
|
|
10
11
|
def cid_set; self[:CIDSet]; end
|
|
11
12
|
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Document Modification Detection and Prevention (DocMDP) —
|
|
7
7
|
# s12.8.2.2. Restricts what edits are allowed after signing.
|
|
8
8
|
class DocMDPTransformParameters < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "DocMDPTransformParameters"
|
|
9
10
|
def type; self[:Type]; end
|
|
10
11
|
def p; self[:P]; end
|
|
11
12
|
def v; self[:V]; end
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Field MDP Transform Parameters (s12.7.6.5). Specifies which
|
|
7
7
|
# fields are locked by a FieldMDP signature reference.
|
|
8
8
|
class FieldMDPTransformParameters < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "FieldMDPTransformParameters"
|
|
9
10
|
def type; self[:Type]; end
|
|
10
11
|
def action; self[:Action]&.to_sym; end
|
|
11
12
|
def fields; self[:Fields]; end
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Font Descriptor CIDType2 (s9.8). Specialised metrics for
|
|
7
7
|
# CIDFontType2 (TrueType-based CID fonts).
|
|
8
8
|
class FontDescriptorCIDType2 < FontDescriptor
|
|
9
|
+
arlington_object "FontDescriptorCIDType2"
|
|
9
10
|
def cid_font_type; 2; end
|
|
10
11
|
|
|
11
12
|
def true_type?; true; end
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Font Encoding dict (s9.6.1). Base encoding + per-glyph differences
|
|
7
7
|
# table for Type 1 fonts.
|
|
8
8
|
class FontEncoding < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "Encoding"
|
|
9
10
|
def base_encoding; self[:BaseEncoding]&.to_sym; end
|
|
10
11
|
def differences; self[:Differences]; end
|
|
11
12
|
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Type 1 font file stream (s7.8.2). Holds the Type1 / Type1C
|
|
7
7
|
# font program. Referenced by FontDescriptor /FontFile.
|
|
8
8
|
class FontFile < Pdfrb::Model::Cos::Stream
|
|
9
|
+
arlington_object "FontFile"
|
|
9
10
|
def length1; self[:Length1]; end
|
|
10
11
|
def length2; self[:Length2]; end
|
|
11
12
|
def length3; self[:Length3]; end
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# TrueType font file stream (s7.8.3). Holds the TTF/OTF program.
|
|
7
7
|
# Referenced by FontDescriptor /FontFile2.
|
|
8
8
|
class FontFile2 < Pdfrb::Model::Cos::Stream
|
|
9
|
+
arlington_object "FontFile2"
|
|
9
10
|
def length1; self[:Length1]; end
|
|
10
11
|
def subtype; self[:Subtype]; end
|
|
11
12
|
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# MultipleMaster Type 1 font (s9.6.2.3). Type 1 font with
|
|
7
7
|
# additional design axes between masters. Deprecated in PDF 2.0.
|
|
8
8
|
class FontMultipleMaster < Font
|
|
9
|
+
arlington_object "FontMultipleMaster"
|
|
9
10
|
def subtype; self[:Subtype]&.to_sym; end
|
|
10
11
|
def name; self[:Name]; end
|
|
11
12
|
def first_char; self[:FirstChar]; end
|
|
@@ -37,6 +38,7 @@ module Pdfrb
|
|
|
37
38
|
# The actual procedures live as streams under their names in a
|
|
38
39
|
# Tiling pattern's Resources.
|
|
39
40
|
class CharProcMap < Pdfrb::Model::Cos::Dictionary
|
|
41
|
+
arlington_object "CharProcMap"
|
|
40
42
|
def entries
|
|
41
43
|
value.each
|
|
42
44
|
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
|
|
@@ -7,6 +7,7 @@ module Pdfrb
|
|
|
7
7
|
# The /Reference entry on a Signature, with /TransformMethod /DocMDP
|
|
8
8
|
# or /UR (Usage Rights).
|
|
9
9
|
class MDPDict < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "MDPDict"
|
|
10
11
|
def type; self[:Type]; end
|
|
11
12
|
def transform_method; self[:TransformMethod]&.to_sym; end
|
|
12
13
|
def transform_params; self[:TransformParams]; 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
|
|
@@ -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
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Signature field lock (s12.7.6.5). Specifies which fields are
|
|
7
7
|
# locked after signing.
|
|
8
8
|
class SigFieldLock < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "SigFieldLock"
|
|
9
10
|
def action; self[:Action]&.to_sym; end
|
|
10
11
|
def fields; self[:Fields]; end
|
|
11
12
|
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Signature field seed value (s12.7.6.6). Constraints the signer
|
|
7
7
|
# must obey when signing (cert issuers, hash algorithms, etc.).
|
|
8
8
|
class SigFieldSeedValue < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "SigFieldSeedValue"
|
|
9
10
|
def filter; self[:Filter]; end
|
|
10
11
|
def sub_filter; self[:SubFilter]; end
|
|
11
12
|
def digest_method; self[:DigestMethod]; end
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Signature dictionary (s12.8.2). Carries the PKCS#7 / CMS
|
|
7
7
|
# signature payload. Lives in a Signature field's /V entry.
|
|
8
8
|
class Signature < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "Signature"
|
|
9
10
|
def type; self[:Type]; end
|
|
10
11
|
def filter; self[:Filter]; end
|
|
11
12
|
def sub_filter; self[:SubFilter]; end
|
|
@@ -42,7 +43,9 @@ module Pdfrb
|
|
|
42
43
|
end
|
|
43
44
|
|
|
44
45
|
def has_byte_range?
|
|
45
|
-
|
|
46
|
+
range = byte_range
|
|
47
|
+
range = range.to_a if range.is_a?(Pdfrb::Model::PdfArray)
|
|
48
|
+
range.is_a?(::Array) && range.size == 4
|
|
46
49
|
end
|
|
47
50
|
|
|
48
51
|
private
|
|
@@ -7,6 +7,7 @@ module Pdfrb
|
|
|
7
7
|
# build-data dict holding filter / PubSec / App / SigQ
|
|
8
8
|
# sub-dictionaries.
|
|
9
9
|
class SignatureBuildDataDict < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "SignatureBuildDataDict"
|
|
10
11
|
def filter; self[:Filter]; end
|
|
11
12
|
def pub_sec; self[:PubSec]; end
|
|
12
13
|
def app; self[:App]; end
|
|
@@ -23,6 +24,7 @@ module Pdfrb
|
|
|
23
24
|
|
|
24
25
|
# Signature Build Data App Dict (s12.8.4.2). Per-app info.
|
|
25
26
|
class SignatureBuildDataAppDict < Pdfrb::Model::Cos::Dictionary
|
|
27
|
+
arlington_object "SignatureBuildDataAppDict"
|
|
26
28
|
def name; self[:Name]; end
|
|
27
29
|
def date; self[:Date]; end
|
|
28
30
|
def r; self[:R]; end
|
|
@@ -33,6 +35,7 @@ module Pdfrb
|
|
|
33
35
|
# Signature Build Data SigQ Dict (s12.8.4.2). PKCS#7 signing
|
|
34
36
|
# request quality metadata.
|
|
35
37
|
class SignatureBuildDataSigQDict < Pdfrb::Model::Cos::Dictionary
|
|
38
|
+
arlington_object "SignatureBuildDataSigQDict"
|
|
36
39
|
def r; self[:R]; end
|
|
37
40
|
def q; self[:Q]; end
|
|
38
41
|
def hash; self[:HashAlgorithm]&.to_sym; end
|
|
@@ -45,6 +48,7 @@ module Pdfrb
|
|
|
45
48
|
# Signature Reference DocMDP (s12.8.2.2). DocMDP signature
|
|
46
49
|
# reference.
|
|
47
50
|
class SignatureReferenceDocMDP < Pdfrb::Model::Cos::Dictionary
|
|
51
|
+
arlington_object "SignatureReferenceDocMDP"
|
|
48
52
|
def type; self[:Type]; end
|
|
49
53
|
def digest_method; self[:DigestMethod]&.to_sym; end
|
|
50
54
|
|
|
@@ -56,12 +60,14 @@ module Pdfrb
|
|
|
56
60
|
# Signature Reference Identity (s12.8.2.2). Identity signature
|
|
57
61
|
# reference.
|
|
58
62
|
class SignatureReferenceIdentity < Pdfrb::Model::Cos::Dictionary
|
|
63
|
+
arlington_object "SignatureReferenceIdentity"
|
|
59
64
|
def type; self[:Type]; end
|
|
60
65
|
def digest_method; self[:DigestMethod]&.to_sym; end
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
# Signature Reference UR (Usage Rights, s12.8.2.3).
|
|
64
69
|
class SignatureReferenceUR < Pdfrb::Model::Cos::Dictionary
|
|
70
|
+
arlington_object "SignatureReferenceUR"
|
|
65
71
|
def type; self[:Type]; end
|
|
66
72
|
def digest_method; self[:DigestMethod]&.to_sym; end
|
|
67
73
|
def transform_params; self[:TransformParams]; end
|
|
@@ -77,6 +83,7 @@ module Pdfrb
|
|
|
77
83
|
# Signature Reference FieldMDP (s12.7.6.5). FieldMDP signature
|
|
78
84
|
# reference.
|
|
79
85
|
class SignatureReferenceFieldMDP < Pdfrb::Model::Cos::Dictionary
|
|
86
|
+
arlington_object "SignatureReferenceFieldMDP"
|
|
80
87
|
def type; self[:Type]; end
|
|
81
88
|
def digest_method; self[:DigestMethod]&.to_sym; end
|
|
82
89
|
def transform_params; self[:TransformParams]; end
|
data/lib/pdfrb/version.rb
CHANGED