aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/foi_attachment.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-17 21:43:40 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-17 21:43:40 +0000
commite190eebf7c4bd6a742706e60f2bf941f70d1a1e4 (patch)
tree0735d4a36215df79a4c8ec854df3793b5f9cb310 /app/models/foi_attachment.rb
parent3affd6ab3d29bf2e86c9d4b00733499d060af20c (diff)
parent41d544631dcb6748ea792f1d8019b5e301056d18 (diff)
Merge branch 'wdtk' into release/0.5
Diffstat (limited to 'app/models/foi_attachment.rb')
-rw-r--r--app/models/foi_attachment.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb
index 20c40abea..74346227b 100644
--- a/app/models/foi_attachment.rb
+++ b/app/models/foi_attachment.rb
@@ -312,13 +312,9 @@ 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()
- end
+ html = AlaveteliExternalCommand.run("unrtf", "--html", tempfile.path)
elsif self.has_google_docs_viewer?
html = '' # force error and using Google docs viewer
else