Ksearch Problem about xpdf

Something occur in the pdf-documentation name with SPACE%20. The syntax error is noted with string “filename has illegal characters”

You can adjust the indexer.pl according to the note in ksearch forum.

http://www.kscripts.com/discus/messages/board-topics.html

I had the same arror as many of you running pdftotext “filename has illegal characters” so I deleted files’ names checking in indexer.pl and now it works fine. The condition is in the index_file function, all you have to do is to comment or delete the following:

if( $file !~ m/^[/\w.+-]*$/ || $file =~ m/../ ) {
print “nIgnoring PDF file ‘$file’: filename has illegal charactersnn”;
print LOG “nIgnoring PDF file ‘$file’: filename has illegal charactersnn” if $MAKE_LOG;
return;
}

I also had a problem with indexer.pl ignoring my .PDF (capital letters) files as it provides case sensitive search so I added a few lines to it. If you have the same problem change in the index_file function the contion on this:

if($PDF_TO_TEXT && ($file =~ m/.pdf$/i || $file =~ m/.PDF$/i)) {

I also added
push @FILE_EXTENSIONS, ‘PDF’ if $PDF_TO_TEXT;
to make sure that files with .PDF extention are not ignored.

Good luck

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *