rpdfium 0.4.2 → 0.4.3
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/CHANGELOG.md +14 -0
- data/lib/rpdfium/page.rb +2 -2
- data/lib/rpdfium/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: acc10e2700ca1e013088725b09fd05d4dee4f9fcf7acdcddba499306f24ec9f7
|
|
4
|
+
data.tar.gz: 9f1f2bb6b40e61e457589d7756eff6fdb85f99310cea86c0a41a187da6f4e32a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07a60e4c5304e1650f583a691e324daf0f2b5fcbb7f1efdd8d333ac8a1fc7e48b7230e23d9cda9c0d8b73e8382c5faa7bf0737e3230bebf55cefe13d822e474d
|
|
7
|
+
data.tar.gz: 2dc6accfa959ced0852d1b48c729eab47556a26eb0ee3e94bc6d3644d7f5d78530ccfd70244a6aa88ea7e2cac4c6a46973db8d8f2838c8b4cad5eccade42a53d
|
data/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.4.3] - 2026-06-16
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`Page#words` now returns numeric `top`/`bottom` coordinates.** Each word's
|
|
16
|
+
`:top` and `:bottom` fields were computed with `chars.min { |c| c[:top] }` /
|
|
17
|
+
`chars.max { |c| c[:bottom] }`. The block form of `Enumerable#min`/`max` must
|
|
18
|
+
return a comparator (-1/0/1) and receives two arguments, so the numeric value
|
|
19
|
+
returned by the single-argument block was used as a broken comparator and the
|
|
20
|
+
method returned the whole char hash instead of the position. As a result
|
|
21
|
+
`word[:top]` and `word[:bottom]` were no longer positional numbers. Fixed by
|
|
22
|
+
using `chars.map { |c| c[:top] }.min` / `.max`, which return the expected
|
|
23
|
+
scalar.
|
|
24
|
+
|
|
11
25
|
## [0.4.2] - 2026-06-15
|
|
12
26
|
|
|
13
27
|
### Added
|
data/lib/rpdfium/page.rb
CHANGED
|
@@ -1599,8 +1599,8 @@ module Rpdfium
|
|
|
1599
1599
|
text: chars.map { |c| c[:char] }.join,
|
|
1600
1600
|
x0: chars.first[:x0],
|
|
1601
1601
|
x1: chars.last[:x1],
|
|
1602
|
-
top: chars.
|
|
1603
|
-
bottom: chars.
|
|
1602
|
+
top: chars.map { |c| c[:top] }.min,
|
|
1603
|
+
bottom: chars.map { |c| c[:bottom] }.max,
|
|
1604
1604
|
fontsize: chars.first[:fontsize],
|
|
1605
1605
|
font: chars.first[:font],
|
|
1606
1606
|
chars: chars
|
data/lib/rpdfium/version.rb
CHANGED