pdfrb 0.7.27 → 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/mdp_dict.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
|
# 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
|
|
@@ -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