Skip to main content.
home | support | download

Back to List Archive

R: Indexing pdf files - Problem with spaces in names

From: Alan Tigri <ATigri(at)not-real.iris-group.it>
Date: Thu Jan 30 2003 - 16:43:55 GMT
change line:
44:	open F, "pdfinfo $file |" || die "$0: Failed to open $file $!";
with line:
44:	open F, "pdfinfo \"$file\" |" || die "$0: Failed to open $file $!";


and line:
83:	open F, "pdftotext $file - |" or die "$0: failed to run pdftotext:
$!";
whit line:
83:	open F, "pdftotext \"$file\" - |" or die "$0: failed to run
pdftotext: $!";


bye...

> -----Messaggio originale-----
> Da:	David Cogley [SMTP:david@cogley.com]
> Inviato:	giovedý 30 gennaio 2003 17.28
> A:	Multiple recipients of list
> Oggetto:	[SWISH-E] Indexing pdf files - Problem with spaces in names
> 
> Can anyone suggest a simple fix to _pdf2html.pl to correct problems with
> directories and filenames that have spaces?
> 
> I have a collection of more than 1000 pdf files in a directory structure
> set
> up by my client.  The client likes the freedom to have spaces in the
> directory and filenames.  If I can figure out how to deal with spaces, I
> can
> avoid a problem with my client.
> 
> When using a FileFilter directive for indexing pdf files, one invokes
> _pdf2html.pl.  One of the first lines in this script is:
> 
>      my $file = shift || die "Usage: $0 <filename>\n";
> 
> shift passes in the part of the argument up to the first whitespace, i.e.,
> just a portion of the full pathname.  stderr gets a usage message and the
> file is not indexed.
> 
> 
> 
> 
> 
Received on Thu Jan 30 16:46:16 2003