Thanks a lot both,

I am going to have a look at your examples and read more documentation
(even if I already did...).

Then, I will come back with more precise questions.

David

2011/11/11 1T3XT BVBA <i...@1t3xt.info>

> On 11/11/2011 18:00, david guede wrote:
> > OK, I understand that the bookmark is probably not connected to the
> > content... no problem with this. But, the bookmark is somewhere on the
> > page and therefore I cn probably get the coordinate of the first
> > letter of the first word for each bookmark (like an X/Y coordinate in
> > the page), right ?
>
> That assumption is wrong in many, many cases.
>
> >  Or evan if it is not possible to get the coordinate of a bookmark, I
> > can probably get the title of it
>
> Please define bookmark.
>
> iText is able to export bookmarks (aka the Outline tree) to an XML file.
> For instance, if you have this PDF:
> http://examples.itextpdf.com/results/part2/chapter07/outline_tree.pdf
> The resulting XML file can look like this:
> http://examples.itextpdf.com/results/part2/chapter07/outline_tree.xml
>
> As Leonard has been trying to explain (but you're not really listening),
> not all bookmarks refer to a coordinate.
>
> This is a case where iText gives you the coordinate AND the title:
> <Title Action="GoTo" Style="bold" Page="1 FitH 806">2001: A Space
> Odyssey</Title>
> On page 1 at the vertical position 806, there's a bookmark with title
> "2001: A Space Odyssey"
>
> But these are bookmarks that don't refer to a coordinate on the page:
> <Title Action="URI" Color="0 0 1"
> URI="http://imdb.com/title/tt0423866/";>link to IMDB</Title>
> <Title Action="JS" Code="app.alert('Movie produced in 1968; run length:
> 141');">instant info</Title>
> The bookmark with title "link to IMDB" is actually a link to a web site.
> The bookmark with title "instant info" is a snippet of JavaScript code.
>
>
> > and then look for the coordinate of the title in the page and finally
> > get the X/Y  coordinates... Am I clear ?
>
> I fear we're talking about totally different things.
>
> > I know that some other lib permit to extract rectangles maybe iText too.
>
> Yes, iText can do that too, but:
> (1) why would you do that if the bookmark already has a title?
> (2) what are you going to do if there is no coordinate?
>
> > If so, I can therefore set an area (a rectangle) to extract text
> > between 2 coordinates I got... Is that totally wrong ?
>
> It's always a good idea to read some documentation before asking
> questions. If you ask half a question, you'll only get half an answer.
> That may be frustrating for you, but it's even more frustrating for
> those who answer. Once you've read the documentation, you'll be able to
> ask accurate questions that can be answered in a more accurate way.
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to