pdfrb 0.7.35 → 0.7.36
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/geospatial.rb +75 -0
- data/lib/pdfrb/model/type/opi.rb +51 -0
- data/lib/pdfrb/model/type/rich_media_presentation.rb +42 -0
- data/lib/pdfrb/model/type/structure_attributes.rb +57 -0
- data/lib/pdfrb/model/type.rb +24 -0
- data/lib/pdfrb/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3740e5c530080b0edb5bae1c91fa903c7e1f3bfefd0d98a293b33bd809bb2ca1
|
|
4
|
+
data.tar.gz: 992edd43f900f4503e43862a3e63e30785794bd00a2f64c10870d362d5527b41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 821f34c0ab86bd434058838c3776f5509ef8779b8ad728932e7a1163019d46e7ccde664eabb5457944a15138edb33aeeb229b299ef7ce0e5228207017c5d40e4
|
|
7
|
+
data.tar.gz: 2e579118cdf84ef58c268c3e10a245b6b880a631eac1770932db8ebed1bffea0cdc3a238da32124322187555a00a467deae01eaf07b0d2563fc48eaac4d52e2a
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# Geographic coordinate system dictionary (s11.5, /GCS):
|
|
7
|
+
# identifies a datum via EPSG code or WKT.
|
|
8
|
+
class GeographicCoordinateSystem < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "GeographicCoordinateSystem"
|
|
10
|
+
|
|
11
|
+
def type; self[:Type]; end
|
|
12
|
+
def epsg; self[:EPSG]; end
|
|
13
|
+
def wkt; self[:WKT]; end
|
|
14
|
+
|
|
15
|
+
def epsg_defined?
|
|
16
|
+
!epsg.nil?
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Projected coordinate system dictionary (s11.5, /DCS):
|
|
21
|
+
# projection plus its underlying geographic system.
|
|
22
|
+
class ProjectedCoordinateSystem < Pdfrb::Model::Cos::Dictionary
|
|
23
|
+
arlington_object "ProjectedCoordinateSystem"
|
|
24
|
+
|
|
25
|
+
def type; self[:Type]; end
|
|
26
|
+
def epsg; self[:EPSG]; end
|
|
27
|
+
def wkt; self[:WKT]; end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Point-data dictionary (s11.5, /PtData): named point arrays
|
|
31
|
+
# mapping geographic to page coordinates.
|
|
32
|
+
class PointData < Pdfrb::Model::Cos::Dictionary
|
|
33
|
+
arlington_object "PointData"
|
|
34
|
+
|
|
35
|
+
def type; self[:Type]; end
|
|
36
|
+
def subtype; self[:Subtype]; end
|
|
37
|
+
def names; self[:Names]; end
|
|
38
|
+
def xpts; self[:XPTS]; end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Projection dictionary (s11.5, 3D annotation /Projection):
|
|
42
|
+
# how 3D content is projected to the page.
|
|
43
|
+
class Projection < Pdfrb::Model::Cos::Dictionary
|
|
44
|
+
arlington_object "Projection"
|
|
45
|
+
|
|
46
|
+
def subtype; self[:Subtype]; end
|
|
47
|
+
def color_space; self[:CS]; end
|
|
48
|
+
def focal_length; self[:F]; end
|
|
49
|
+
def near; self[:N]; end
|
|
50
|
+
def field_of_view; self[:FOV]; end
|
|
51
|
+
def projection_scale; self[:PS]; end
|
|
52
|
+
def orthographic_scale; self[:OS]; end
|
|
53
|
+
def clipping_bbox; self[:OB]; end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Number format dictionary (s11.4.2): unit, precision, and
|
|
57
|
+
# denominators for measurement display.
|
|
58
|
+
class NumberFormat < Pdfrb::Model::Cos::Dictionary
|
|
59
|
+
arlington_object "NumberFormat"
|
|
60
|
+
|
|
61
|
+
def type; self[:Type]; end
|
|
62
|
+
def unit; self[:U]; end
|
|
63
|
+
def conversion_factor; self[:C]; end
|
|
64
|
+
def fractional_digits; self[:F]; end
|
|
65
|
+
def denominator; self[:D]; end
|
|
66
|
+
def fd; self[:FD]; end
|
|
67
|
+
def fraction_display_type; self[:RT]; end
|
|
68
|
+
def rounding_type; self[:RD]; end
|
|
69
|
+
def thousands_separator; self[:PS]; end
|
|
70
|
+
def negative_style; self[:SS]; end
|
|
71
|
+
def pre_text; self[:O]; end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pdfrb
|
|
4
|
+
module Model
|
|
5
|
+
module Type
|
|
6
|
+
# OPI version 1.3 dictionary (s14.11.6, deprecated 2.0):
|
|
7
|
+
# low-resolution proxy information for OPI workflows.
|
|
8
|
+
class OPIVersion13Dict < Pdfrb::Model::Cos::Dictionary
|
|
9
|
+
arlington_object "OPIVersion13Dict"
|
|
10
|
+
|
|
11
|
+
def version; self[:Version]; end
|
|
12
|
+
def file_spec; self[:F]; end
|
|
13
|
+
def id; self[:ID]; end
|
|
14
|
+
def comments; self[:Comments]; end
|
|
15
|
+
def size; self[:Size]; end
|
|
16
|
+
def crop_rect; self[:CropRect]; end
|
|
17
|
+
def crop_fixed; self[:CropFixed]; end
|
|
18
|
+
def position; self[:Position]; end
|
|
19
|
+
def resolution; self[:Resolution]; end
|
|
20
|
+
def color_type; self[:ColorType]; end
|
|
21
|
+
def color; self[:Color]; end
|
|
22
|
+
def tint; self[:Tint]; end
|
|
23
|
+
def overprint; self[:Overprint]; end
|
|
24
|
+
def image_type; self[:ImageType]; end
|
|
25
|
+
def gray_map; self[:GrayMap]; end
|
|
26
|
+
def transparency; self[:Transparency]; end
|
|
27
|
+
def tags; self[:Tags]; end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# OPI version 2.0 dictionary (s14.11.6, deprecated 2.0).
|
|
31
|
+
class OPIVersion20Dict < Pdfrb::Model::Cos::Dictionary
|
|
32
|
+
arlington_object "OPIVersion20Dict"
|
|
33
|
+
|
|
34
|
+
def version; self[:Version]; end
|
|
35
|
+
def file_spec; self[:F]; end
|
|
36
|
+
def id; self[:ID]; end
|
|
37
|
+
def comments; self[:Comments]; end
|
|
38
|
+
def size; self[:Size]; end
|
|
39
|
+
def crop_rect; self[:CropRect]; end
|
|
40
|
+
def position; self[:Position]; end
|
|
41
|
+
def resolution; self[:Resolution]; end
|
|
42
|
+
def color_type; self[:ColorType]; end
|
|
43
|
+
def tint; self[:Tint]; end
|
|
44
|
+
def overprint; self[:Overprint]; end
|
|
45
|
+
def image_type; self[:ImageType]; end
|
|
46
|
+
def transparency; self[:Transparency]; end
|
|
47
|
+
def tags; self[:Tags]; end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -25,6 +25,48 @@ module Pdfrb
|
|
|
25
25
|
document.object(ref)
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
# RichMedia instance /Params (s13.6.2.9): FlashVars, bindings,
|
|
30
|
+
# and cue points.
|
|
31
|
+
class RichMediaParams < Pdfrb::Model::Cos::Dictionary
|
|
32
|
+
arlington_object "RichMediaParams"
|
|
33
|
+
|
|
34
|
+
def flash_vars; self[:FlashVars]; end
|
|
35
|
+
def binding; self[:Binding]; end
|
|
36
|
+
def binding_material; self[:BindingMaterial]; end
|
|
37
|
+
def cue_points; self[:CuePoints]; end
|
|
38
|
+
def settings; self[:Settings]; end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# RichMedia height constraints (s13.6.9.5): /Default /Max /Min
|
|
42
|
+
# in percentages of window height.
|
|
43
|
+
class RichMediaHeight < Pdfrb::Model::Cos::Dictionary
|
|
44
|
+
arlington_object "RichMediaHeight"
|
|
45
|
+
|
|
46
|
+
def default; self[:Default]; end
|
|
47
|
+
def max; self[:Max]; end
|
|
48
|
+
def min; self[:Min]; end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# RichMedia width constraints (s13.6.9.5).
|
|
52
|
+
class RichMediaWidth < Pdfrb::Model::Cos::Dictionary
|
|
53
|
+
arlington_object "RichMediaWidth"
|
|
54
|
+
|
|
55
|
+
def default; self[:Default]; end
|
|
56
|
+
def max; self[:Max]; end
|
|
57
|
+
def min; self[:Min]; end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# RichMedia window/content positioning (s13.6.9.5): alignment
|
|
61
|
+
# and offsets.
|
|
62
|
+
class RichMediaPosition < Pdfrb::Model::Cos::Dictionary
|
|
63
|
+
arlington_object "RichMediaPosition"
|
|
64
|
+
|
|
65
|
+
def h_align; self[:HAlign]; end
|
|
66
|
+
def v_align; self[:VAlign]; end
|
|
67
|
+
def h_offset; self[:HOffset]; end
|
|
68
|
+
def v_offset; self[:VOffset]; end
|
|
69
|
+
end
|
|
28
70
|
end
|
|
29
71
|
end
|
|
30
72
|
end
|
|
@@ -7,6 +7,7 @@ module Pdfrb
|
|
|
7
7
|
# attributes — owner + per-owner attribute fields (Layout, Table,
|
|
8
8
|
# List, PrintField, etc.).
|
|
9
9
|
class StructureAttributes < Pdfrb::Model::Cos::Dictionary
|
|
10
|
+
arlington_object "StructureAttributesDict"
|
|
10
11
|
def owner; self[:O]; end
|
|
11
12
|
def namespace; self[:NS]; end
|
|
12
13
|
def placement; self[:Placement]&.to_sym; end
|
|
@@ -39,6 +40,62 @@ module Pdfrb
|
|
|
39
40
|
!!namespace
|
|
40
41
|
end
|
|
41
42
|
end
|
|
43
|
+
|
|
44
|
+
# Role map (s14.7.3, StructTreeRoot /RoleMap): custom element
|
|
45
|
+
# names mapped to standard structure types.
|
|
46
|
+
class RoleMap < Pdfrb::Model::Cos::Dictionary
|
|
47
|
+
arlington_object "RoleMap"
|
|
48
|
+
|
|
49
|
+
def [](custom_name)
|
|
50
|
+
value[custom_name.to_sym] || value[custom_name.to_s]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def custom_names
|
|
54
|
+
value.keys
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Namespaced role map (s14.7.3, /RoleMapNS): per-namespace role
|
|
59
|
+
# maps keyed by namespace URI.
|
|
60
|
+
class RoleMapNS < Pdfrb::Model::Cos::Dictionary
|
|
61
|
+
arlington_object "RoleMapNS"
|
|
62
|
+
|
|
63
|
+
def [](namespace)
|
|
64
|
+
value[namespace.to_sym] || value[namespace.to_s]
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Style dictionary (s14.9.2, /Styles entries): number-of-style
|
|
69
|
+
# to style-attributes mapping with an optional /Panose.
|
|
70
|
+
class StyleDict < Pdfrb::Model::Cos::Dictionary
|
|
71
|
+
arlington_object "StyleDict"
|
|
72
|
+
|
|
73
|
+
def panose; self[:Panose]; end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Class map (s14.7.4, StructTreeRoot /ClassMap): reusable
|
|
77
|
+
# attribute-owner dictionaries shared by structure elements.
|
|
78
|
+
class ClassMap < Pdfrb::Model::Cos::Dictionary
|
|
79
|
+
arlington_object "ClassMap"
|
|
80
|
+
|
|
81
|
+
def [](class_name)
|
|
82
|
+
value[class_name.to_sym] || value[class_name.to_s]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def class_names
|
|
86
|
+
value.keys
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Reference structure element kid (s14.8.2.4, /Reference):
|
|
91
|
+
# points at content elsewhere via /F file, /Page, /ID.
|
|
92
|
+
class StructureReference < Pdfrb::Model::Cos::Dictionary
|
|
93
|
+
arlington_object "Reference"
|
|
94
|
+
|
|
95
|
+
def file; self[:F]; end
|
|
96
|
+
def page; self[:Page]; end
|
|
97
|
+
def ids; self[:ID]; end
|
|
98
|
+
end
|
|
42
99
|
end
|
|
43
100
|
end
|
|
44
101
|
end
|
data/lib/pdfrb/model/type.rb
CHANGED
|
@@ -525,6 +525,30 @@ module Pdfrb
|
|
|
525
525
|
autoload :AddActionScreenAnnotation, "pdfrb/model/type/add_action_screen_annotation"
|
|
526
526
|
autoload :AddActionWidgetAnnotation, "pdfrb/model/type/add_action_widget_annotation"
|
|
527
527
|
|
|
528
|
+
# Geospatial support (s11.5) + number formats (s11.4).
|
|
529
|
+
autoload :GeographicCoordinateSystem, "pdfrb/model/type/geospatial"
|
|
530
|
+
autoload :ProjectedCoordinateSystem, "pdfrb/model/type/geospatial"
|
|
531
|
+
autoload :PointData, "pdfrb/model/type/geospatial"
|
|
532
|
+
autoload :Projection, "pdfrb/model/type/geospatial"
|
|
533
|
+
autoload :NumberFormat, "pdfrb/model/type/geospatial"
|
|
534
|
+
|
|
535
|
+
# OPI proxy dictionaries (s14.11.6, deprecated 2.0).
|
|
536
|
+
autoload :OPIVersion13Dict, "pdfrb/model/type/opi"
|
|
537
|
+
autoload :OPIVersion20Dict, "pdfrb/model/type/opi"
|
|
538
|
+
|
|
539
|
+
# RichMedia sizing/positioning (s13.6.9.5).
|
|
540
|
+
autoload :RichMediaParams, "pdfrb/model/type/rich_media_presentation"
|
|
541
|
+
autoload :RichMediaHeight, "pdfrb/model/type/rich_media_presentation"
|
|
542
|
+
autoload :RichMediaWidth, "pdfrb/model/type/rich_media_presentation"
|
|
543
|
+
autoload :RichMediaPosition, "pdfrb/model/type/rich_media_presentation"
|
|
544
|
+
|
|
545
|
+
# Structure tree maps + references (s14.7, s14.8).
|
|
546
|
+
autoload :RoleMap, "pdfrb/model/type/structure_attributes"
|
|
547
|
+
autoload :RoleMapNS, "pdfrb/model/type/structure_attributes"
|
|
548
|
+
autoload :StyleDict, "pdfrb/model/type/structure_attributes"
|
|
549
|
+
autoload :ClassMap, "pdfrb/model/type/structure_attributes"
|
|
550
|
+
autoload :StructureReference, "pdfrb/model/type/structure_attributes"
|
|
551
|
+
|
|
528
552
|
# Requirements handlers (s7.9.2, Catalog /Requirements).
|
|
529
553
|
autoload :Requirements3DMarkup, "pdfrb/model/type/requirements"
|
|
530
554
|
autoload :RequirementsAcroFormInteract, "pdfrb/model/type/requirements"
|
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.36
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -1060,6 +1060,7 @@ files:
|
|
|
1060
1060
|
- lib/pdfrb/model/type/function_sampled.rb
|
|
1061
1061
|
- lib/pdfrb/model/type/function_stitching.rb
|
|
1062
1062
|
- lib/pdfrb/model/type/generic_appearance.rb
|
|
1063
|
+
- lib/pdfrb/model/type/geospatial.rb
|
|
1063
1064
|
- lib/pdfrb/model/type/graphics_state_parameter.rb
|
|
1064
1065
|
- lib/pdfrb/model/type/halftone.rb
|
|
1065
1066
|
- lib/pdfrb/model/type/halftone_type1.rb
|
|
@@ -1096,6 +1097,7 @@ files:
|
|
|
1096
1097
|
- lib/pdfrb/model/type/namespace.rb
|
|
1097
1098
|
- lib/pdfrb/model/type/object_reference.rb
|
|
1098
1099
|
- lib/pdfrb/model/type/object_stream.rb
|
|
1100
|
+
- lib/pdfrb/model/type/opi.rb
|
|
1099
1101
|
- lib/pdfrb/model/type/opt_content_ext.rb
|
|
1100
1102
|
- lib/pdfrb/model/type/opt_content_page_element.rb
|
|
1101
1103
|
- lib/pdfrb/model/type/optional_content_config.rb
|