aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mediagoblin/media_types/pdf/processing.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mediagoblin/media_types/pdf/processing.py b/mediagoblin/media_types/pdf/processing.py
index 4dd894d8..a000007a 100644
--- a/mediagoblin/media_types/pdf/processing.py
+++ b/mediagoblin/media_types/pdf/processing.py
@@ -316,11 +316,13 @@ class CommonPdfProcessor(MediaProcessor):
"""
Store the pdf. If the file is not a pdf, make it a pdf
"""
- tmp_pdf = self.process_filename
+ tmp_pdf = os.path.splitext(self.process_filename)[0] + '.pdf'
unoconv = where('unoconv')
+ args = [unoconv, '-v', '-f', 'pdf', self.process_filename]
+ _log.debug('calling %s' % repr(args))
Popen(executable=unoconv,
- args=[unoconv, '-v', '-f', 'pdf', self.process_filename]).wait()
+ args=args).wait()
if not os.path.exists(tmp_pdf):
_log.debug('unoconv failed to convert file to pdf')