Re: [greenstone-users] Difficulties for Persian PDF files

From Katherine Don
DateThu, 03 Nov 2005 10:50:52 +1300
Subject Re: [greenstone-users] Difficulties for Persian PDF files
In-Reply-To (20051030073746-72287-qmail-web33015-mail-mud-yahoo-com)
Hi MOH

I tried with the file you sent - if I had -input_encoding option off
(i.e. defaults to auto), then it worked fine. If I set it to utf8 then
it didn't work.

You can edit perllib/plugins/PDFPlug.pm, and change

if ($self->{'input_encoding'} eq "auto") {
# pdftohtml will always produce html files encoded as utf-8
# => restrict primary PDFPlug and secondary HTML plugin to use
# utf8 and extract language.
$self->{'input_encoding'} = "utf8";
$self->{'extract_language'} = 1;

push(@$html_options,"-input_encoding", "utf8");
push(@$html_options,"-extract_language");
}

to

if ($self->{'input_encoding'} eq "auto") {
# pdftohtml will always produce html files encoded as utf-8
# => restrict primary PDFPlug and secondary HTML plugin to use
# utf8 and extract language.
$self->{'input_encoding'} = "utf8";
$self->{'extract_language'} = 1;

push(@$html_options,"-extract_language");
}
push(@$html_options,"-input_encoding", "utf8");

i.e. move the input encoding line outside of the if statement.

Then hopefully your Persian documents will work fine.

Regards,
Katherine

MOH Scorpion wrote:
> Hi ,
> i had difficulties for persian word files , it solved
> by a new word plugin , but this problem is also in pdf
> files i think i have to test other formats .
> but now please tell me where the problem is and it can
> be solved.
>
>
> =
>
> __________________________________ =
>
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Memory.pdf
> Type: application/pdf
> Size: 180116 bytes
> Desc: 3914590986-Memory.pdf
> Url : https://list.scms.waikato.ac.nz/mailman/private/greenstone-users/atta=
> chments/20051030/fb1fef2c/Memory.pdf
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
>