pdfrb 0.7.23 → 0.7.24
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/collection.rb +1 -0
- data/lib/pdfrb/model/type/collection_colors.rb +36 -0
- data/lib/pdfrb/model/type/collection_field.rb +1 -0
- data/lib/pdfrb/model/type/collection_folder.rb +33 -0
- data/lib/pdfrb/model/type/collection_item.rb +1 -0
- data/lib/pdfrb/model/type/collection_schema.rb +1 -0
- data/lib/pdfrb/model/type/collection_sort.rb +1 -0
- data/lib/pdfrb/model/type/collection_split.rb +24 -0
- data/lib/pdfrb/model/type/collection_subitem.rb +21 -0
- data/lib/pdfrb/model/type.rb +4 -0
- data/lib/pdfrb/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7f4bfdd940c5efb31509b47b458c221611bd9fab8e65f45c3c5f0d4a55af63e
|
|
4
|
+
data.tar.gz: ca8423b413d1c1c22387df07f0cb8deac73549b3be0b944cfbe96600b43a146c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e047623b3eb1d875605e7582e56c11c38c963acef221ac017f977e9c875efc291081c2fe7f66d8ed27b1bbe5f76cf75770f8605288c89a98157d90102b2c3f9c
|
|
7
|
+
data.tar.gz: a072c1ca23b1e030a276f8dc15483ef26d852b5889bd8896d1b6f22efcaab0e2a772c132fa14405a99d301649e4447e9dcf28133279ea592a1f297f115a4caad
|
|
@@ -7,6 +7,7 @@ module Pdfrb
|
|
|
7
7
|
# collection of embedded files with a presentation schema. Lives
|
|
8
8
|
# on Catalog /Collection.
|
|
9
9
|
class Collection < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "Collection"
|
|
10
11
|
def schema; self[:Schema]; end
|
|
11
12
|
def default_view; self[:View]; end
|
|
12
13
|
def sort; self[:Sort]; end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# Collection colors (s7.11.5, PDF 1.7 Adobe extension level 3).
|
|
7
|
+
# UI color scheme for the portfolio view; each value is a 0..1 RGB
|
|
8
|
+
# or Gray component array.
|
|
9
|
+
class CollectionColors < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "CollectionColors"
|
|
11
|
+
|
|
12
|
+
def background; self[:Background]; end
|
|
13
|
+
def card_background; self[:CardBackground]; end
|
|
14
|
+
def card_border; self[:CardBorder]; end
|
|
15
|
+
def primary_text; self[:PrimaryText]; end
|
|
16
|
+
def secondary_text; self[:SecondaryText]; end
|
|
17
|
+
|
|
18
|
+
def gray_background?
|
|
19
|
+
components(background) == 1
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def rgb_background?
|
|
23
|
+
components(background) == 3
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def components(color)
|
|
29
|
+
return 0 if color.nil?
|
|
30
|
+
|
|
31
|
+
color.is_a?(Pdfrb::Model::PdfArray) ? color.to_a.size : 0
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# Collection folder (s7.11.5, PDF 1.7 Adobe extension level 3).
|
|
7
|
+
# A folder node in the portfolio's folder hierarchy.
|
|
8
|
+
class CollectionFolder < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "CollectionFolder"
|
|
10
|
+
|
|
11
|
+
def id; self[:ID]; end
|
|
12
|
+
def name; self[:Name]; end
|
|
13
|
+
def parent; self[:Parent]; end
|
|
14
|
+
def child; self[:Child]; end
|
|
15
|
+
def next_folder; self[:Next]; end
|
|
16
|
+
def collection_item; self[:CI]; end
|
|
17
|
+
def description; self[:Desc]; end
|
|
18
|
+
def creation_date; self[:CreationDate]; end
|
|
19
|
+
def modified_date; self[:ModDate]; end
|
|
20
|
+
def thumbnail; self[:Thumb]; end
|
|
21
|
+
def free; self[:Free]; end
|
|
22
|
+
|
|
23
|
+
def root_folder?
|
|
24
|
+
parent.nil?
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def has_children?
|
|
28
|
+
!child.nil?
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -6,6 +6,7 @@ module Pdfrb
|
|
|
6
6
|
# Collection item (s7.11.5). Per-embedded-file values for the
|
|
7
7
|
# schema fields.
|
|
8
8
|
class CollectionItem < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "CollectionItem"
|
|
9
10
|
def value_for(field_name)
|
|
10
11
|
self[field_name.to_sym] || self[field_name.to_s]
|
|
11
12
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# Collection split (s7.11.5, PDF 1.7 Adobe extension level 3).
|
|
7
|
+
# Where the portfolio view places the split between panels.
|
|
8
|
+
class CollectionSplit < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "CollectionSplit"
|
|
10
|
+
|
|
11
|
+
def direction; self[:Direction]; end
|
|
12
|
+
def position; self[:Position]; end
|
|
13
|
+
|
|
14
|
+
def vertical?
|
|
15
|
+
direction == :V
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def horizontal?
|
|
19
|
+
direction == :H
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# Collection subitem (s7.11.5, PDF 1.7 Adobe extension level 3).
|
|
7
|
+
# Assigns one embedded file to a folder via the folder's /P path
|
|
8
|
+
# and the /D display value.
|
|
9
|
+
class CollectionSubitem < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "CollectionSubitem"
|
|
11
|
+
|
|
12
|
+
def display_value; self[:D]; end
|
|
13
|
+
def parent_folder_path; self[:P]; end
|
|
14
|
+
|
|
15
|
+
def numeric_display?
|
|
16
|
+
display_value.is_a?(Numeric)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/pdfrb/model/type.rb
CHANGED
|
@@ -337,6 +337,10 @@ module Pdfrb
|
|
|
337
337
|
autoload :CollectionSort, "pdfrb/model/type/collection_sort"
|
|
338
338
|
autoload :CollectionField, "pdfrb/model/type/collection_field"
|
|
339
339
|
autoload :CollectionItem, "pdfrb/model/type/collection_item"
|
|
340
|
+
autoload :CollectionColors, "pdfrb/model/type/collection_colors"
|
|
341
|
+
autoload :CollectionFolder, "pdfrb/model/type/collection_folder"
|
|
342
|
+
autoload :CollectionSplit, "pdfrb/model/type/collection_split"
|
|
343
|
+
autoload :CollectionSubitem, "pdfrb/model/type/collection_subitem"
|
|
340
344
|
|
|
341
345
|
# Signature transform parameters (s12.8.2).
|
|
342
346
|
autoload :MDPDict, "pdfrb/model/type/mdp_dict"
|
data/lib/pdfrb/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.7.24
|
|
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-
|
|
11
|
+
date: 2026-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -1007,10 +1007,14 @@ files:
|
|
|
1007
1007
|
- lib/pdfrb/model/type/cid_system_info.rb
|
|
1008
1008
|
- lib/pdfrb/model/type/circle_annotation.rb
|
|
1009
1009
|
- lib/pdfrb/model/type/collection.rb
|
|
1010
|
+
- lib/pdfrb/model/type/collection_colors.rb
|
|
1010
1011
|
- lib/pdfrb/model/type/collection_field.rb
|
|
1012
|
+
- lib/pdfrb/model/type/collection_folder.rb
|
|
1011
1013
|
- lib/pdfrb/model/type/collection_item.rb
|
|
1012
1014
|
- lib/pdfrb/model/type/collection_schema.rb
|
|
1013
1015
|
- lib/pdfrb/model/type/collection_sort.rb
|
|
1016
|
+
- lib/pdfrb/model/type/collection_split.rb
|
|
1017
|
+
- lib/pdfrb/model/type/collection_subitem.rb
|
|
1014
1018
|
- lib/pdfrb/model/type/crypt_filter.rb
|
|
1015
1019
|
- lib/pdfrb/model/type/d_part.rb
|
|
1016
1020
|
- lib/pdfrb/model/type/device_n.rb
|