onlyoffice_pdf_parser 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6577365ab2e448b529c115aabb38a949e0fb29ce1602bc328d93b148d8f2ed12
|
4
|
+
data.tar.gz: ca04942d93ca2f4dc46adacaa854107d863df14210484fc31c4572dda81e7e6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28dcdf6c0c0ecba2413eae1a7d4c2e350ba7b4644fdec158b152a8bec62260214704dc0e222358fe8f9b8dfe7f14e592892c38d91c57f23a0de4153099422eb4
|
7
|
+
data.tar.gz: 55848ce72ffef764b5a12b93c1eab8c67e8deffa997225637efdd73db18faaed1385c1738436369ee9b207c9344c145d9144b64316cfb11f78981d2cbc29043f
|
@@ -8,7 +8,6 @@ require_relative 'helpers/cursor_point'
|
|
8
8
|
module OnlyofficePdfParser
|
9
9
|
# class for storing bmp image pixels data
|
10
10
|
class BmpImage
|
11
|
-
include Magick
|
12
11
|
attr_accessor :path_to_image, :pixels, :width, :height
|
13
12
|
# @return [String] binary dat of file
|
14
13
|
attr_reader :data
|
@@ -92,7 +91,7 @@ module OnlyofficePdfParser
|
|
92
91
|
|
93
92
|
private
|
94
93
|
|
95
|
-
# @param param [String] file path of file
|
94
|
+
# @param param [String] file path of file binary data
|
96
95
|
# @return [Void] init class data
|
97
96
|
def init_data(param)
|
98
97
|
if OnlyofficePdfParser::FileHelper.file_path?(param)
|
@@ -108,7 +107,9 @@ module OnlyofficePdfParser
|
|
108
107
|
def fetch_pixels
|
109
108
|
tmp_file = Tempfile.new('onlyoffice_pdf_parser')
|
110
109
|
File.binwrite(tmp_file, data)
|
111
|
-
@pixels = ImageList.new(tmp_file.path)
|
110
|
+
@pixels = Magick::ImageList.new(tmp_file.path)
|
111
|
+
.get_pixels(0, 0, width, height)
|
112
|
+
.each_slice(width).to_a
|
112
113
|
tmp_file.unlink
|
113
114
|
end
|
114
115
|
|
@@ -14,8 +14,8 @@ module PdfConvertToBmpHelper
|
|
14
14
|
|
15
15
|
private
|
16
16
|
|
17
|
-
# @param path_pattern [String] pattern to find
|
18
|
-
# @return [Array<String>] list of
|
17
|
+
# @param path_pattern [String] pattern to find BMPs
|
18
|
+
# @return [Array<String>] list of BMPs
|
19
19
|
def multipage_files(path_pattern)
|
20
20
|
files_dir = File.dirname(path_pattern)
|
21
21
|
files_base = File.basename(path_pattern, '.*')
|
@@ -15,7 +15,7 @@ module OnlyofficePdfParser
|
|
15
15
|
attr_accessor :pages
|
16
16
|
# @return [String] full path to file
|
17
17
|
attr_accessor :file_path
|
18
|
-
# @return [Array<String>] bin representation of
|
18
|
+
# @return [Array<String>] bin representation of BMPs
|
19
19
|
attr_reader :pages_in_bmp
|
20
20
|
|
21
21
|
def initialize(pages: [], file_path: nil)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_pdf_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Lobashov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: image_size
|
@@ -49,156 +49,22 @@ dependencies:
|
|
49
49
|
name: rmagick
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '4'
|
55
|
-
type: :runtime
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '4'
|
62
|
-
-
|
63
|
-
name: overcommit
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
type: :development
|
70
|
-
prerelease: false
|
71
|
-
version_requirements: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: parallel_tests
|
78
|
-
requirement: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3'
|
83
|
-
type: :development
|
84
|
-
prerelease: false
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3'
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: rake
|
92
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '13'
|
97
|
-
type: :development
|
98
|
-
prerelease: false
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '13'
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
name: rspec
|
106
|
-
requirement: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '3'
|
111
|
-
type: :development
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '3'
|
118
|
-
- !ruby/object:Gem::Dependency
|
119
|
-
name: rubocop
|
120
|
-
requirement: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1'
|
125
|
-
type: :development
|
126
|
-
prerelease: false
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '1'
|
132
|
-
- !ruby/object:Gem::Dependency
|
133
|
-
name: rubocop-performance
|
134
|
-
requirement: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '1'
|
139
|
-
type: :development
|
140
|
-
prerelease: false
|
141
|
-
version_requirements: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '1'
|
146
|
-
- !ruby/object:Gem::Dependency
|
147
|
-
name: rubocop-rake
|
148
|
-
requirement: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
type: :development
|
154
|
-
prerelease: false
|
155
|
-
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
- !ruby/object:Gem::Dependency
|
161
|
-
name: rubocop-rspec
|
162
|
-
requirement: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '2'
|
167
|
-
type: :development
|
168
|
-
prerelease: false
|
169
|
-
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '2'
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
name: simplecov
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - "~>"
|
55
|
+
- - "<"
|
179
56
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
181
|
-
type: :
|
57
|
+
version: '7'
|
58
|
+
type: :runtime
|
182
59
|
prerelease: false
|
183
60
|
version_requirements: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
- !ruby/object:Gem::Dependency
|
189
|
-
name: yard
|
190
|
-
requirement: !ruby/object:Gem::Requirement
|
191
61
|
requirements:
|
192
62
|
- - ">="
|
193
63
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
195
|
-
|
196
|
-
prerelease: false
|
197
|
-
version_requirements: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
64
|
+
version: '4'
|
65
|
+
- - "<"
|
200
66
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
67
|
+
version: '7'
|
202
68
|
description: Library for parsing, converting and extracting PDF data
|
203
69
|
email:
|
204
70
|
- shockwavenn@gmail.com
|
@@ -219,12 +85,11 @@ files:
|
|
219
85
|
- lib/onlyoffice_pdf_parser/version.rb
|
220
86
|
homepage: https://github.com/ONLYOFFICE-QA/onlyoffice_pdf_parser
|
221
87
|
licenses:
|
222
|
-
- AGPL-3.0
|
88
|
+
- AGPL-3.0-or-later
|
223
89
|
metadata:
|
224
90
|
bug_tracker_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_pdf_parser/issues
|
225
91
|
changelog_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_pdf_parser/blob/master/CHANGELOG.md
|
226
92
|
documentation_uri: https://www.rubydoc.info/gems/onlyoffice_pdf_parser
|
227
|
-
homepage_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_pdf_parser
|
228
93
|
source_code_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_pdf_parser
|
229
94
|
rubygems_mfa_required: 'true'
|
230
95
|
post_install_message:
|
@@ -235,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
235
100
|
requirements:
|
236
101
|
- - ">="
|
237
102
|
- !ruby/object:Gem::Version
|
238
|
-
version: '
|
103
|
+
version: '3.0'
|
239
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
105
|
requirements:
|
241
106
|
- - ">="
|
242
107
|
- !ruby/object:Gem::Version
|
243
108
|
version: '0'
|
244
109
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.5.10
|
246
111
|
signing_key:
|
247
112
|
specification_version: 4
|
248
113
|
summary: ONLYOFFICE PDF Parser Gem
|