I actually do something similar with a jsp file. For example the url
would be
http://localhost:8080/whatever.pdf#xml=http://localhost:8080/pdfbox.jsp&;
words=termsToHighlight 

One of my stumbling blocks was finding the correct writer to use. 

I used this method.

PrintWriter xmlWriter = new PrintWriter(response.getWriter());

highlighter.generateXMLHighlight( doc, termsToHighlight.split( " "
),xmlWriter);

Good Luck!

Best Regards,

 Michael

-----Original Message-----
From: Kenneth D Weinert [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2008 7:03 AM
To: [email protected]
Subject: Re: Problems with using the highlighter for pdf files

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It looks like you are trying to create the xml file on the fly - I'm
not sure that works.

The "xml" file needs to have a very specific format and I don't
believe that the Acroread/Acrobat is going to run a program for you to
generate it.

If I recall correctly, you'll have to use your jsp to generate the xml
file from the pdf and then load the pdf file along with the resulting
xml file.

Stebin Kottakakathu John wrote:
> Hi
>
> I am using pdfbox to highlight a particular search  term in a pdf .
> I have tried the web application provided with pdfbox,to create an
highlight xml file however the pdf doesn't get highlighted.
> I guess it is to do with the passing of the parameters into the pdf
file...
> Is there an extra plugin(for acrobat reader) required to do this ..
>
> My url looks like this..
>
>
>
http://grants.nih.gov/grants/funding/phs398/othersupport.pdf#xml=http://
localhost:8080/pdfbox/highlight.jsp?pdf=http://grants.nih.gov/grants/fun
ding/phs398/othersupport.pdf&words=some
>
> The pdf opens but is not highlighted..
> Please guide me on this front
>
> Thanks in advance
> Regards,
> Stebin
>
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely
> for the use of the addressee(s). If you are not the intended
recipient,
please
> notify the sender by e-mail and delete the original message. Further,
you are not
> to copy, disclose, or distribute this e-mail or its contents to any
other person and
> any such actions are unlawful. This e-mail may contain viruses.
Infosys
has taken
> every reasonable precaution to minimize this risk, but is not liable
for any damage
> you may sustain as a result of any virus in this e-mail. You should
carry out your
> own virus checks before opening the e-mail or attachment. Infosys
reserves the
> right to monitor and review the content of all messages sent to or
from
this e-mail
> address. Messages sent to or from this e-mail address may be stored on
the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>

- --
Ken Weinert
http://quarter-flash.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIrqrpH0OpnUzq8fARAnzHAJ91AQ6f7cNFrTkK2ZYd7lv0Y27L8ACeKqMW
CdSs9dAU6aOSz3KrunCefhI=
=aRZK
-----END PGP SIGNATURE-----

Reply via email to