Shoaib Gauhar wrote:

Hello
    I am using SimpleBookmark class to get bookmarks
from a PDF file by using
SimpleBookmark.getBookmark(reader) method. The main
problem is that when it returns a list, i am unable to
extract the required information from the fields in
it, especially Named field.

That's the beauty of named destinations:
you don't have to worry about the page number and location.

Some PDF files return
Action and Page fields along with their values but
some of them return Action and Named.

Why does this surprise you?

How can i get
the Page information from only two fields i.e. Action
and Named. I have tried but in vain to make something
out of the value of this Named field but it doesnt
make sense.

It's a name. Names don't always make sense.
They are chosen by whoever named the destinations.

   The problem is that i am unable to get an idea of
the type of bookmark that these (Action and Named
fields) are indicating.
It's PDF; the PDF Reference is there to help you.

   Please can you tell me how to get or extract
information from Named and Action to set a bookmark. I
will be very thankful.

<>You can retrieve the named destinations inside a PDF file like this:
HashMap map = SimpleNamedDestination.getNamedDestination(reader, false);
SimpleNamedDestination.exportToXML(map, new FileOutputStream("remote.xml"), "ISO8859-1", true);
Normally you should get names that correspond with what you have
in your bookmarks.
br,
Bruno


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to