aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-17 14:24:48 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-17 14:24:48 +0000
commit701c8987063419956e9dd4dc6d57d9e27e7d91f3 (patch)
treec33755da103e04365d022e9c8c4dc883ae52c002
parent384f4b0d75753ad8e3a7ee405156433c8930a6ec (diff)
Do not hard-code the path to pdftohtml
-rw-r--r--app/models/foi_attachment.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb
index 20c40abea..6cad0ed01 100644
--- a/app/models/foi_attachment.rb
+++ b/app/models/foi_attachment.rb
@@ -312,9 +312,7 @@ class FoiAttachment < ActiveRecord::Base
tempfile.flush
if self.content_type == 'application/pdf'
- IO.popen("/usr/bin/pdftohtml -nodrm -zoom 1.0 -stdout -enc UTF-8 -noframes " + tempfile.path + "", "r") do |child|
- html = child.read()
- end
+ html = AlaveteliExternalCommand.run("pdftohtml", "-nodrm", "-zoom", "1.0", "-stdout", "-enc", "UTF-8", "-noframes", tempfile.path)
elsif self.content_type == 'application/rtf'
IO.popen("/usr/bin/unrtf --html " + tempfile.path + "", "r") do |child|
html = child.read()