hexapdf 1.9.0 → 1.9.1

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: d51b41e4326a58a6c3d51e8ee0ee3ce1ee194199d9967817240dac81205ba573
4
- data.tar.gz: ac3ca606173c2fad485bf5df8d5fb8947c33aab2fc28b970516adedf804de5eb
3
+ metadata.gz: e272dafd41bb732e5110aadc794399a3e5d9823571de2ee67f119f05422af9ac
4
+ data.tar.gz: 1269ed888e0b5c3fac4b4a25afbcdab75835252aadaf46fe6a92cfbde379f330
5
5
  SHA512:
6
- metadata.gz: dea3e27895918e159dedb6b8ff44b5db055e886656d1439d8d927fab57e9b1039489d9234392109b52a881ae67a02716c48a12dba9534e4d7894ab5e4c93251f
7
- data.tar.gz: bef1d2e5217562c4772e1dc16a1a38e8342c741a1bcc404cabe203ed07268e8e25c2f5476749a8712362cece9dada4ed91e6e989a88872f7c4d08c3e24298823
6
+ metadata.gz: 69f36a31e49cb7b434bc53e63c2fde4c271a506046224a0dbb76b473176f435d618d0e9de90a64f3b95c4fa64cec8a8addbcb4c5c997ac9790fd79bd46093306
7
+ data.tar.gz: 786835f800b29263364d97c872465b7fcaf431bf846a793a3fe502810090bc6ce1b94089a18f2787ed5cc3e9b982cf0a2d33db68b7812861f938e4f209af17d4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.9.1 - 2026-06-09
2
+
3
+ ### Fixed
4
+
5
+ * [HexaPDF::Content::Processor] to delegate processing of the `'` and `"`
6
+ operators to the 'Tj' operator
7
+
8
+
1
9
  ## 1.9.0 - 2026-06-07
2
10
 
3
11
  ### Added
@@ -75,6 +75,8 @@ module HexaPDF
75
75
  # provided. Both can directly be invoked from the 'show_text' and 'show_text_with_positioning'
76
76
  # methods.
77
77
  #
78
+ # There is a default implementation of 'move_text_next_line_and_show_text' and
79
+ # 'set_spacing_move_text_next_line_and_show_text' that just defers to 'show_text'.
78
80
  class Processor
79
81
 
80
82
  # Represents an (immutable) glyph box with positioning information.
@@ -365,6 +367,18 @@ module HexaPDF
365
367
 
366
368
  protected
367
369
 
370
+ # Provides a default implementation for the ' operator which just invokes #show_text if it is
371
+ # available. All other processing is already done by the operator implementation.
372
+ def move_text_next_line_and_show_text(text)
373
+ show_text(text) if respond_to?(:show_text, true)
374
+ end
375
+
376
+ # Provides a default implementation for the " operator which just invokes #show_text if it is
377
+ # available. All other processing is already done by the operator implementation.
378
+ def set_spacing_move_text_next_line_and_show_text(_word_space, _char_space, text)
379
+ show_text(text) if respond_to?(:show_text, true)
380
+ end
381
+
368
382
  # Provides a default implementation for the 'Do' operator.
369
383
  #
370
384
  # It checks if the XObject is a Form XObject and if so, processes the contents of the Form
@@ -37,6 +37,6 @@
37
37
  module HexaPDF
38
38
 
39
39
  # The version of HexaPDF.
40
- VERSION = '1.9.0'
40
+ VERSION = '1.9.1'
41
41
 
42
42
  end
@@ -87,6 +87,23 @@ describe HexaPDF::Content::Processor do
87
87
  end
88
88
  end
89
89
 
90
+ describe "(set_spacing_)move_text_next_line_and_show_text" do
91
+ it "invokes show_text if it exists" do
92
+ @processor.process(:BT)
93
+
94
+ # nothing should happen here as no show_text is yet defined
95
+ @processor.process(:"'", ['Text'])
96
+ @processor.process(:'"', [10, 5, 'Text'])
97
+
98
+ value = nil
99
+ @processor.define_singleton_method(:show_text) {|text| value = text }
100
+ @processor.process(:"'", ['Text1'])
101
+ assert_equal('Text1', value)
102
+ @processor.process(:'"', [10, 5, 'Text2'])
103
+ assert_equal('Text2', value)
104
+ end
105
+ end
106
+
90
107
  describe "paint_xobject" do
91
108
  it "processes the contents of a Form xobject" do
92
109
  test_case = self
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hexapdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-06-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: cmdparse
@@ -925,7 +925,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
925
925
  - !ruby/object:Gem::Version
926
926
  version: '0'
927
927
  requirements: []
928
- rubygems_version: 3.6.2
928
+ rubygems_version: 4.0.3
929
929
  specification_version: 4
930
930
  summary: HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby
931
931
  test_files: []