On Fri, Jun 14, 2002 at 11:11:35AM +0100, Dean Richard Benson wrote:
> Hi there
> 
> I have just read over a couple of mutt configuration files.  I notice 
> that in some mailcap files there is a pdftotext-filter mentioned.  Does
> anyone know where I can get that file from at all?
> 
> I have the pdftotext program but not the shell script that is menioned 
> in the mailcap file.

For anyone that needs it, Roland has just sent me it through my inbox:
(its a simple, but nicely effective wrapper script)

- Dean

#! /bin/sh
#
# $Id: pdftotext-filter,v 1.1 1999/06/10 10:49:26 roland Exp $
#
# This is a little script to use pdftotext from the xpdf package as a
# filter
# which reads a PDF file on stdin and writes an ASCII file on stdout.
#
##########################################################################
#
#   Copyright (C) 1999  Roland Rosenfeld <[EMAIL PROTECTED]>
#
#   This program is free software; you can redistribute it and/or
#   modify it under the terms of the GNU General Public License as
#   published by the Free Software Foundation; either version 2 of
#   the License, or (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#   General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
##########################################################################

umask 077

tmpdir=${TMPDIR-/tmp}/pdftotext.$$
mkdir $tmpdir || exit 1
trap "rm -rf $tmpdir; exit" 0 1 2 3 15

cat > $tmpdir/pdftotext.pdf
pdftotext $tmpdir/pdftotext.pdf
cat $tmpdir/pdftotext.txt

Attachment: msg29003/pgp00000.pgp
Description: PGP signature

Reply via email to