pdfrb 0.7.29 → 0.7.30

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a8b1b706618c7a1e4ceb7373b2c9a2ca0ec84391aa8570476f4fdec96e955ef
4
- data.tar.gz: 4b4be07bc31d2e21de54a3458caf558878b8648961f514d6e7fc2ea19c82b4c9
3
+ metadata.gz: 83af6e7d49d84f03ca76b743164b0b4116c259d08719287cf9248afd0affd5ec
4
+ data.tar.gz: 5a4de5047f8b57c96543d73a3cafb6903cadb965f1877a4aecef42d57247a5ff
5
5
  SHA512:
6
- metadata.gz: d18f1ccadfcdce61fb0568ee158f4037a1c693e5706134c4766976ab77a7e3ec16d8acb2ae1f08f9bf02d20e604fe24e0416c481dc67745c6f4a8a2a7c8f5333
7
- data.tar.gz: c1104b11eb1cd74cc5cc82b213bed68c15a1a750581a569836581e79e1aa28c83532d154df67de3c735049df3b88a55a10f70e6ba52af39d869aa5a141f8ef14
6
+ metadata.gz: 5a99b5fc62f8f4503577e598996fdc55216a9935da101d1b2c1ab03e5d6931db606938385132b3bbe81c573dcea5439e6bbb006ed51e5ef30333626382da3f3b
7
+ data.tar.gz: 1f4b6b491db49a6852e358901e2539c40609caccf8a01a3e0948f10d3fe7fbc09f5a810947acb719c35c285bf90c7ca6d9a51a6718985b002c3b09aa3d891b46
@@ -3,13 +3,19 @@
3
3
  module Pdfrb
4
4
  module Model
5
5
  module Type
6
- # DeviceN color space (s8.6.6.4). Multiple custom colorants mapped
7
- # through a single tint-transform function. Generalises Separation.
6
+ # DeviceN attributes dictionary (s8.6.6.4, the 5th element of
7
+ # the DeviceN color space array). Names extra colorants and
8
+ # process/mixing hints.
8
9
  class DeviceN < Pdfrb::Model::Cos::Dictionary
9
- def colorants; self[:Names]; end
10
- def alternate_space; self[:AlternateSpace]; end
11
- def tint_transform; self[:TintTransform]; end
12
- def attributes; self[:Attributes]; end
10
+ arlington_object "DeviceNDict"
11
+ def subtype; self[:Subtype]&.to_sym; end
12
+ def colorants; self[:Colorants]; end
13
+ def process; self[:Process]; end
14
+ def mixing_hints; self[:MixingHints]; end
15
+
16
+ def nchannel?
17
+ subtype == :NChannel
18
+ end
13
19
 
14
20
  def colorant_count
15
21
  return 0 unless colorants
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # DeviceN Mixing Hints (s8.6.6.5). Per-colorant device hints.
7
7
  class DeviceNMixingHints < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "DeviceNMixingHints"
8
9
  def solidities; self[:Solidities]; end
9
10
  def dot_gain; self[:DotGain]; end
10
11
 
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # DeviceN Process (s8.6.6.4). Process colorant list.
7
7
  class DeviceNProcess < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "DeviceNProcess"
8
9
  def color_space; self[:ColorSpace]; end
9
10
  def components; self[:Components]; end
10
11
  end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # IconFit (s12.5.6.19). Controls positioning/scaling of a button
7
7
  # field's icon within its rectangle.
8
8
  class IconFit < Cos::Dictionary
9
+ arlington_object "IconFit"
9
10
  register_type :IconFit
10
11
 
11
12
  def type; self[:Type]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # MarkInformation (s14.7.1). Catalog /MarkInfo — flags whether
7
7
  # the document is tagged and structural metadata is reliable.
8
8
  class MarkInformation < Cos::Dictionary
9
+ arlington_object "MarkInfo"
9
10
  register_type :MarkInfo
10
11
 
11
12
  def type; self[:Type]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Measure dictionary (s11.4). Used by line/poly annotations and
7
7
  # XObjects to map PDF units to real-world units.
8
8
  class Measure < Cos::Dictionary
9
+ arlington_object "MeasureRL"
9
10
  register_type :Measure
10
11
 
11
12
  def type; self[:Type]; end
@@ -34,6 +35,28 @@ module Pdfrb
34
35
  !!area_format
35
36
  end
36
37
  end
38
+
39
+ # Geospatial Measure dictionary (s11.4, /Subtype /GEO with
40
+ # GCS/DCS). Maps geographic coordinates onto page geometry.
41
+ class GeospatialMeasure < Pdfrb::Model::Cos::Dictionary
42
+ arlington_object "MeasureGEO"
43
+
44
+ def type; self[:Type]; end
45
+ def subtype; self[:Subtype]; end
46
+ def bounds; self[:Bounds]; end
47
+ def geographic_coordinate_system; self[:GCS]; end
48
+ def projected_coordinate_system; self[:DCS]; end
49
+ def pdu; self[:PDU]; end
50
+ def gpts; self[:GPTS]; end
51
+ def lpts; self[:LPTS]; end
52
+ def pcsm; self[:PCSM]; end
53
+
54
+ def bound_count
55
+ arr = bounds
56
+ arr = arr.to_a if arr.is_a?(Pdfrb::Model::PdfArray)
57
+ arr&.size
58
+ end
59
+ end
37
60
  end
38
61
  end
39
62
  end
@@ -12,6 +12,7 @@ module Pdfrb
12
12
  # Conforming readers MUST NOT interpret application-private
13
13
  # data; it survives round-trips and incremental updates intact.
14
14
  class PagePieceInfo < Pdfrb::Model::Cos::Dictionary
15
+ arlington_object "PagePiece"
15
16
  # The application-name key (e.g. :Adobe, :Pdfrb). Multiple
16
17
  # applications may each have their own entry in the same
17
18
  # /PieceInfo dict.
@@ -7,11 +7,11 @@ module Pdfrb
7
7
  # mapped through a tint-transform function. Used for spot colors
8
8
  # like PANTONE 185 C.
9
9
  class Separation < Pdfrb::Model::Cos::Dictionary
10
- def alternate_space; self[:AlternateSpace]; end
11
- def tint_transform; self[:TintTransform]; end
12
- def colorant_name; self[:Colorant]; end
13
-
14
- def components; 1; end
10
+ arlington_object "Separation"
11
+ def color_space; self[:ColorSpace]; end
12
+ def device_colorant; self[:DeviceColorant]; end
13
+ def key; self[:Key]; end
14
+ def pages; self[:Pages]; end
15
15
 
16
16
  def resolved_tint_transform
17
17
  ref = tint_transform
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # UR Transform Parameters (s12.8.2.3). Adobe Reader-enabled
7
7
  # usage rights — annotations, form fill-in, signatures allowed.
8
8
  class URTransformParameters < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "URTransformParameters"
9
10
  def type; self[:Type]; end
10
11
  def annotations; self[:Annots]; end
11
12
  def form; self[:Form]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # URI dict (s12.5.6.5). Catalog /URI dict for base URI and
7
7
  # retriever map.
8
8
  class URIDict < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "URI"
9
10
  def base; self[:Base]; end
10
11
  def retriever_map; self[:Map]; end
11
12
 
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # URL Alias (s7.9.6). Names dictionary entry mapping friendly
7
7
  # URLs to actual URLs for collection sub-items.
8
8
  class URLAlias < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "URLAlias"
9
10
  def type; self[:Type]; end
10
11
  def alias_value; self[:U]; end
11
12
  def url; self[:URL]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # ViewerPreferences (s12.2, ISO 32000-2 7.7.2). Catalog /ViewerPreferences.
7
7
  class ViewerPreferences < Cos::Dictionary
8
+ arlington_object "ViewerPreferences"
8
9
  register_type :ViewerPreferences
9
10
 
10
11
  def type; self[:Type]; end
@@ -97,6 +97,7 @@ module Pdfrb
97
97
  autoload :VariableTextField, "pdfrb/model/type/variable_text_field"
98
98
  autoload :DocumentSecurityStore, "pdfrb/model/type/document_security_store"
99
99
  autoload :Measure, "pdfrb/model/type/measure"
100
+ autoload :GeospatialMeasure, "pdfrb/model/type/measure"
100
101
  autoload :OptionalContentConfiguration, "pdfrb/model/type/optional_content_config"
101
102
  autoload :MarkedContentReference, "pdfrb/model/type/marked_content_reference"
102
103
  autoload :AppearanceGenerator, "pdfrb/model/type/appearance_generator"
data/lib/pdfrb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pdfrb
4
- VERSION = "0.7.29"
4
+ VERSION = "0.7.30"
5
5
  end
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.29
4
+ version: 0.7.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.