On Thu, May 20, 2010 at 11:09 AM, Mike Marchywka <[email protected]>wrote:
> > > > > > > > > > > ________________________________ > > Date: Thu, 20 May 2010 05:27:32 -0700 > > From: [email protected] > > To: [email protected] > > Subject: Re: [iText-questions] text searching + opening a document > directly to the search result location > > > > > > > > Hello again! > > > > Ok, I'll try to make it a bit clearer. Imagine this table: > > > > Property Name | Blah 1 | .... Blah n | HELP_BUTTON > > property 1 | | | btnHelp > > propery 2 | | |btnHelp > > > Is this in a browser or your own app? > > > > > > It the user presses the btnHelp, the Pdf help-file should appear on the > screen. > > This document has the explanations for all the properties. For example: > > > > 1. Property 1 > > blahblah and more blah. > > > > 2. Property 2 > > blaaaah (tables, diagrams...) > > > > are the properties and help responses relatively static and known apriori > or quite dyanmic? > > > > Because the help is amassed in one file, the client would want this > behavior: > > -user clicks on property "n" btnHelp > > -pdf document opens scrolled directly to "n. Property n....." - much like > the bookmark behavior > > Well, everyone gets requests like this you may want to get a better idea of > what the actual end product should be from the user's view point. If the > concern > is general quality of the help text or there is some unique facility > provided by > pdf it may make sense but for users who want information for an immediate > need they may not need lots of pictures. You probably don't want a tutorial > as you are getting ready to submit a form to trade securities, launch a > missile, or land a plane. > > > > > > I found the SetOpenAction method. > > It executes when the document opens. But it needs some parameters. It > needs a LocalDestination. And here i thought that the "text searching" would > come in. I was thinking that: > > - get Property Name from the table > > - search "n. property n" string in the PDF > > - get the coordinates, location of the string occurrence > > presumably the "search" is being done by the viewer or do you want itext to > do this? > > > > - set the Open Action > > would to the trick. > > > > But can I do that? Any other suggestions or solutions would be welcomed. > > Get a better idea of what the user is supposed to experience and write > scripts to parse > the source pdf into a suitable format unless pdf is the right choice. > > > > > > Thank you for your time & patience. > > It is easier now than to find out later you have designed a system that I > need to use > to do something simple- many agencies have been sold on pdf and probably > try to do stuff > like this all the time. There are some very good pdf products generated > each week > by govt agencies that have pictorical information, but then there are many > submissions > from people forced to make public declarations that use pdf as a big way to > hide data from > automated processing etc etc etc. > > ... To my surprise, Mike, this time I think *I* understand what Victor is after. Victor imagines he's asking for a simple operation, and, in the first place, just wants to know if iText can be part of the solution. The answer, unfortunately, is "yes and no" (as so often happens). If I'm correct, Mike, this is all about browser-oriented work. Victor expected iText would have some sort of method whose input is a textual string, like "a piece of text found in the content", and whose output is something like (page number, x-coordinate, y-coordinate). No, iText does *not* have that; Victor, textual extraction remains a hard problem <URL: http://www.itworld.com/software/102862/friends-dont-let-friends-extract-pdf-content>. HOWEVER, Victor, it might be that you're in a position to decorate your PDFs with "named destinations"; at that point, your solution is trivial.
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
