We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 99d927f + 79b75cd commit 8602b33Copy full SHA for 8602b33
lib/docsplit/pdf_extractor.rb
@@ -19,7 +19,12 @@ def linux?
19
# The first line of the help output holds the name and version number
20
# of the office software to be used for extraction.
21
def version_string
22
- @@help ||= `#{office_executable} -h 2>&1`.split("\n").first
+ versionstr = `#{office_executable} -h 2>&1`.split("\n").first
23
+ if !!versionstr.match(/[0-9]*/)
24
+ versionstr = `#{office_executable} --version`.split("\n").first
25
+ end
26
+ @@help ||= versionstr
27
+
28
end
29
def libre_office?
30
!!version_string.match(/^LibreOffice/)
0 commit comments