Re: [greenstone-users] mailing list archives / document pdf highlighting

From Arthur R. Belanger
DateFri, 16 Feb 2007 08:32:28 -0500
Subject Re: [greenstone-users] mailing list archives / document pdf highlighting
In-Reply-To (40133-130-217-240-32-1171589522-squirrel-webmail-scms-waikato-ac-nz)
Anna, John et al.:

You can pass search parameters to the Acrobat Reader (at least 7.0.5 =
or=20
above). The search and toher parameters are documented at:


http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_cre=
ation_apis_and_specs/PDFOpenParameters.pdf

I have added this link to my SearchVlist format statement to perform=
=20
this function in a new window/tab. I have only tested it with single=
=20
word search terms. The link will open the pdf file in a new window/t=
ab,=20
perform the search and highlight the terms in the document just as if=
=20
you did it manually. The Greenstone search term is passed by the=
=20
Stefan Boddie macro.

<a=20
href=3D/gsdl/collect/gsarch/index/assoc/[archivedir]/[Source]#search=3D&q=
uot;Stefan Boddie&quot;=20
target=3Dpdfview>Search PDF</a>"


Hope this helps.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
Anna Huang wrote:
> Dear John,
>=20
> Acrobat Reader does have a "Whole words only" search option that ma=
tch
> whatever search terms as a whole word. But to my knowledge, current=
ly it
> doesn't support setting this parameter on opening a PDF file from U=
RL.
>=20
> As for the punctuation, you can try to add some javascript to do th=
e
> proper encoding. Here is what I did.
>=20
> I changed the source link in the search result list to this,
>=20
> <a href=3D\"#\"
> onClick=3D\"javascript:safe_link('/gsdl/collect/gsarch/index/assoc/[a=
rchivedir]/[Source]',
> 'Stefan Boddie')\">{Or}{[ex.thumbicon],[ex.srcicon]}</a>
>=20
> then added the following javascript in the macro =
in
> extra.dm. The script also gets rid of the quotes.
>=20
> function safe_link(baseurl, argq) {
> =09var safeq =3D argq.replace(/"/g,"");
> =09safeq =3D encodeURI(safeq);
> =09var safeurl =3D baseurl+"#search=3D&quot;"+safeq+"&quot;";
> =09window.location =3D safeurl;
> }
>=20
>=20
> Regards
> Anna
>=20
>=20
>> Dear Anna,
>>
>> I have tested this in MGPP and it seems to work
>> well for when searching for individual words without punctuation. =
But :
>> * if I use the phrase search facility (phrase in
>> quotes), the phrase is not highlighted in the pdf
>> file (the quotes are in the Acrobat search box which may be confus=
ing)
>> * if I search for a word with elided article in
>> French (e.g. l'exhaustivit=E9), the word
>> "exhaustivit=E9" is found in the html version of
>> the document but not in the original pdf (whether
>> I search on "l'exhausivit=E9" or "exhaustivit=E9").
>>
>> Is there a fix for these problems? Best regards, John
>>
>>
>>> Date: Thu, 18 Jan 2007 11:45:29 +1300 (NZDT)
>>> From: "Anna Huang" <lh92@cs.waikato.ac.nz>
>>> Subject: Re: [greenstone-users] mailing list archives / document =
pdf
>>> highlighting
>>> To: "Anson Parker" <ansondparker@hotmail.com>
>>> Cc: greenstone-users@list.scms.waikato.ac.nz
>>> Message-ID:
>>> <56126.130.217.240.32.1169073929.squirrel@webmail.scms.wa=
ikato.ac.nz>
>>> Content-Type: text/plain;charset=3Diso-8859-1
>>>
>>> Hello Anson,
>>>
>>> Do you mean highlight pdf with search terms? If so, there is a tu=
torial
>>> exercise on how to do this at
>>> http://greenstone.sourceforge.net/wiki/gsdoc/tutorial/en/formatti=
ng_word_pdf.htm
>>>
>>> Hope this helps,
>>> Anna
>>>
>>>> Salaam All,
>>>> I remember a discussion on pdf highlighting, however the list ar=
chive
>>>> links
>>>> don't seem to be working
>>>>
>>>> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-user=
s
>>>>
>>>> are the archive links wrong / is the server down / all else fail=
ing
>>> does
>>>> anyone remember what the additional string for pdf highlighting =
is?
>>>>
>>>> Rock on,
>>>> Anson
>>>>
>>>> (oh yeah, for those interested
>>>> http://www.marshallfoundation.org/Database.htm is very close to =
going
>>>> live.... any suggestions from the universe welcomed...)
>>>>
>>>> ________________________________________________________________=
_
>>>> Fixing up the home? Live Search can help
>>>>
>>> http://imagine-windowslive.com/search/kits/default.aspx?kit=3Dimp=
rove&locale=3Den-US&source=3Dhmemailtaglinenov06&FORM=3DWLMTAG
>>>>
>>>> _______________________________________________
>>>> greenstone-users mailing list
>>>> greenstone-users@list.scms.waikato.ac.nz
>>>> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-user=
s
>>>>
>>
>> John B. Rose
>> 1 Bis, Rue des Ch=E2tre-Sacs
>> 92310 S=E8vres
>> France
>> Email: <johnrose@alumni.caltech.edu>
>>
>>
>>
>=20
>=20
> Cheers
> Anna
>=20
>=20
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>=20

--=20
Arthur Belanger
Medical Library System Manager
Academic Media & Technology
ITS
Yale University
100 Church Street South, Suite 107
Mailcode 138
New Haven, CT 06519

(203) 785-6928
(203) 737-2859, fax

mailto:Arthur.Belanger@Yale.Edu
http://www.yale.edu/acs
http://info.med.yale.edu/library