Back to index

moin  1.9.0~rc2
application_pdf.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 """
00003     MoinMoin - PDF filter
00004 
00005     Depends on: pdftotext command from either xpdf-utils or poppler-utils
00006                 or any other package that provides a pdftotext command that
00007                 is callable with: pdftotext -enc UTF-8 filename.pdf -
00008 
00009     @copyright: 2006 MoinMoin:ThomasWaldmann
00010     @license: GNU GPL, see COPYING for details.
00011 """
00012 
00013 from MoinMoin.filter import execfilter
00014 
00015 def execute(indexobj, filename):
00016     # using -q switch to get quiet operation (no messages, no errors),
00017     # because poppler-utils pdftotext on Debian/Etch otherwise generates
00018     # lots of output on stderr (e.g. 10MB stderr output) and that causes
00019     # problems in current execfilter implementation.
00020     return execfilter("pdftotext -q -enc UTF-8 %s -", filename)
00021