pdfrb 0.7.30 → 0.7.31

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: 83af6e7d49d84f03ca76b743164b0b4116c259d08719287cf9248afd0affd5ec
4
- data.tar.gz: 5a4de5047f8b57c96543d73a3cafb6903cadb965f1877a4aecef42d57247a5ff
3
+ metadata.gz: 477baf83aeea6245724da9acdf754de37f90c24c210a86ca2da935a30634dec0
4
+ data.tar.gz: f871f4bb91ede07091487d953ef28604397db256f054216474e1006f55fcf95a
5
5
  SHA512:
6
- metadata.gz: 5a99b5fc62f8f4503577e598996fdc55216a9935da101d1b2c1ab03e5d6931db606938385132b3bbe81c573dcea5439e6bbb006ed51e5ef30333626382da3f3b
7
- data.tar.gz: 1f4b6b491db49a6852e358901e2539c40609caccf8a01a3e0948f10d3fe7fbc09f5a810947acb719c35c285bf90c7ca6d9a51a6718985b002c3b09aa3d891b46
6
+ metadata.gz: f3daf7059880972579adc591b6d8f648e7c031743794257aab14905859ac7a62e805c631ee1d9b16215415bcd276c2effbdbfa8070b679b0542b24989ac2585f
7
+ data.tar.gz: ab06fa9aebbcc46b2e9fbd1b054d591b5bfa512c13c0ea2ccbbc51973b64e3107b885120923015249250ad206d3bda3ebb9eff6d1a700961d842cb673c7db7fc
@@ -9,9 +9,26 @@ module Pdfrb
9
9
 
10
10
  def push_button?; flags & 0x10000 != 0; end
11
11
  def radio?; flags & 0x8000 != 0; end
12
+ def checkbox?; !push_button? && !radio?; end
12
13
  def no_toggle_to_off?; flags & 0x4000 != 0; end
13
14
  def radios_in_unison?; flags & 0x2000000 != 0; end
14
15
  end
16
+
17
+ # Checkbox button field (s12.7.4.2.2, /Ft /Btn without push or
18
+ # radio flags).
19
+ class CheckboxButton < Button
20
+ arlington_object "FieldBtnCheckbox"
21
+ end
22
+
23
+ # Pushbutton field (s12.7.4.2.4).
24
+ class PushButton < Button
25
+ arlington_object "FieldBtnPush"
26
+ end
27
+
28
+ # Radio button field (s12.7.4.2.3).
29
+ class RadioButton < Button
30
+ arlington_object "FieldBtnRadio"
31
+ end
15
32
  end
16
33
  end
17
34
  end
@@ -4,6 +4,7 @@ module Pdfrb
4
4
  module Model
5
5
  module Type
6
6
  class Choice < Field
7
+ arlington_object "FieldChoice"
7
8
  def value; self[:V]; end
8
9
  def opt; self[:Opt]; end
9
10
  def top_index; self[:TI]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # EmbeddedFileParameterDictionary (s7.11.3.1). Per /EF entry
7
7
  # /Params dict — checksum, size, dates, mac creator.
8
8
  class EmbeddedFileParameter < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "EmbeddedFileParameter"
9
10
  def size; self[:Size]; end
10
11
  def creation_date; self[:CreationDate]; end
11
12
  def modification_date; self[:ModDate]; end
@@ -7,6 +7,7 @@ module Pdfrb
7
7
  # EmbeddedFile stream reference: /F (type 1), /UF (Unicode),
8
8
  # /DOS, /Mac, /Unix.
9
9
  class FileSpecEF < Pdfrb::Model::Cos::Dictionary
10
+ arlington_object "FileSpecEF"
10
11
  def primary_file; self[:F]; end
11
12
  def unicode_file; self[:UF]; end
12
13
  def dos_file; self[:DOS]; end
@@ -5,6 +5,7 @@ module Pdfrb
5
5
  module Type
6
6
  # Filespec RF dict (s7.11.2.3). Related files name tree.
7
7
  class FileSpecRF < Pdfrb::Model::Cos::Dictionary
8
+ arlington_object "FileSpecRF"
8
9
  def related_files; self[:Names]; end
9
10
 
10
11
  def each_related(&block)
@@ -4,6 +4,7 @@ module Pdfrb
4
4
  module Model
5
5
  module Type
6
6
  class Field < Cos::Dictionary
7
+ arlington_object "Field"
7
8
  register_type :Field
8
9
 
9
10
  def field_type; self[:FT]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Marked-Content Reference (s14.7.6.2). Refers to a marked-content
7
7
  # sequence on a page by MCID.
8
8
  class MarkedContentReference < Cos::Dictionary
9
+ arlington_object "MarkedContentReference"
9
10
  register_type :MCR
10
11
 
11
12
  def type; self[:Type]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Namespace dictionary (s14.7.6.1, PDF 2.0). Namespaces for
7
7
  # structure element types in tagged PDF documents.
8
8
  class Namespace < Cos::Dictionary
9
+ arlington_object "Namespace"
9
10
  register_type :Namespace
10
11
 
11
12
  def type; self[:Type]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Object reference dict (s14.7.6). Used in structure trees to
7
7
  # refer to a content item without including it directly.
8
8
  class ObjectReference < Cos::Dictionary
9
+ arlington_object "ObjectReference"
9
10
  register_type :ObjRef
10
11
 
11
12
  def type; self[:Type]; end
@@ -4,6 +4,7 @@ module Pdfrb
4
4
  module Model
5
5
  module Type
6
6
  class SignatureField < Field
7
+ arlington_object "FieldSig"
7
8
  def value; self[:V]; end
8
9
  def lock; self[:Lock]; end
9
10
  def seed_value; self[:SV]; end
@@ -6,6 +6,7 @@ module Pdfrb
6
6
  # Software Identifier (s13.3.5.5). Identifies a player for
7
7
  # media rendering.
8
8
  class SoftwareIdentifier < Pdfrb::Model::Cos::Dictionary
9
+ arlington_object "SoftwareIdentifier"
9
10
  def type; self[:Type]; end
10
11
  def u; self[:U]; end
11
12
  def l; self[:L]; end
@@ -4,6 +4,7 @@ module Pdfrb
4
4
  module Model
5
5
  module Type
6
6
  class TextField < Field
7
+ arlington_object "FieldTx"
7
8
  def max_len; self[:MaxLen]; end
8
9
  def value; self[:V]; end
9
10
  def rich_text_value; self[:RV]; end
@@ -7,6 +7,7 @@ module Pdfrb
7
7
  # pages in FullScreen mode. Lives on Page /Trans or on an
8
8
  # ActionTrans.
9
9
  class Transition < Pdfrb::Model::Cos::Dictionary
10
+ arlington_object "Transition"
10
11
  def type; self[:Type]; end
11
12
  def style; self[:S]&.to_sym; end
12
13
  def duration; self[:D]; end
@@ -38,6 +39,7 @@ module Pdfrb
38
39
  # Printer Mark sub-dictionary (s12.5.6.18). Per-printer-mark
39
40
  # sub-parameters.
40
41
  class PrinterMarkSubDict < Pdfrb::Model::Cos::Dictionary
42
+ arlington_object "AppearancePrinterMarkSubDict"
41
43
  def printer; self[:PRINTER]; end
42
44
  def credentials; self[:CREDS]; end
43
45
  end
@@ -45,6 +47,7 @@ module Pdfrb
45
47
  # ExData 3D Markup (s13.6.1). 3D scene metadata for Projection
46
48
  # annotations / 3D models.
47
49
  class ExData3DMarkup < Pdfrb::Model::Cos::Dictionary
50
+ arlington_object "ExData3DMarkup"
48
51
  def type; self[:Type]; end
49
52
  def v3d; self[:V3D]; end
50
53
 
@@ -56,6 +59,7 @@ module Pdfrb
56
59
  # ExData Markup Geo (s12.5.6.21). Geo-spatial markup attached to
57
60
  # a Projection annotation.
58
61
  class ExDataMarkupGeo < Pdfrb::Model::Cos::Dictionary
62
+ arlington_object "ExDataMarkupGeo"
59
63
  def type; self[:Type]; end
60
64
  def coordinate_path; self[:CoordinatePath]; end
61
65
 
@@ -93,6 +93,7 @@ module Pdfrb
93
93
  autoload :LineEndingStyling, "pdfrb/model/type/line_ending_styling"
94
94
  autoload :InteriorColor, "pdfrb/model/type/interior_color"
95
95
  autoload :ObjectReference, "pdfrb/model/type/object_reference"
96
+ autoload :Namespace, "pdfrb/model/type/namespace"
96
97
  autoload :SquareCircle, "pdfrb/model/type/square_circle"
97
98
  autoload :VariableTextField, "pdfrb/model/type/variable_text_field"
98
99
  autoload :DocumentSecurityStore, "pdfrb/model/type/document_security_store"
@@ -104,6 +105,9 @@ module Pdfrb
104
105
  autoload :Field, "pdfrb/model/type/form_field"
105
106
  autoload :TextField, "pdfrb/model/type/text_field"
106
107
  autoload :Button, "pdfrb/model/type/button"
108
+ autoload :CheckboxButton, "pdfrb/model/type/button"
109
+ autoload :PushButton, "pdfrb/model/type/button"
110
+ autoload :RadioButton, "pdfrb/model/type/button"
107
111
  autoload :Choice, "pdfrb/model/type/choice"
108
112
  autoload :SignatureField, "pdfrb/model/type/signature_field"
109
113
  autoload :ViewerPreferences, "pdfrb/model/type/viewer_preferences"
@@ -403,6 +407,9 @@ module Pdfrb
403
407
  autoload :Field, "pdfrb/model/type/form_field"
404
408
  autoload :TextField, "pdfrb/model/type/text_field"
405
409
  autoload :Button, "pdfrb/model/type/button"
410
+ autoload :CheckboxButton, "pdfrb/model/type/button"
411
+ autoload :PushButton, "pdfrb/model/type/button"
412
+ autoload :RadioButton, "pdfrb/model/type/button"
406
413
  autoload :Choice, "pdfrb/model/type/choice"
407
414
  autoload :SignatureField, "pdfrb/model/type/signature_field"
408
415
 
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.30"
4
+ VERSION = "0.7.31"
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.30
4
+ version: 0.7.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.