Krishna, Take a look at org.apache.pdfbox.examples.pdmodel.CreateBookmarks. You can append a bookmark to the document outline (as this example does), or to another bookmark (see PDOutlineItem::insertSiblingAfter()).
It should be pretty self-explanatory, but you can always check the PDF specifications for the technical details and/or open someone else's PDF which has nested bookmarks in a text editor to see how they link together. Good luck. ---- Thanks, Adam From: "Krishnan Kishore" <[email protected]> To: <[email protected]> Date: 07/26/2010 05:40 Subject: to generate Table of contents like tree HI all, I am very new to this group, I could able to generate table of contents for an PDF and give a book mark it Now I want a piece of code to generate Table of contents like tree (parent , child)and generate book mark to each child node, Please help in this regard. Any link or any previous post is appreciated I am using PDFBOX and .net Cheers krishna Confidentiality Notice: This transmittal is a confidential communication. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error and that any review, dissemination, distribution or copying of this transmittal is strictly prohibited. If you have received this communication in error, please notify this office immediately by reply and immediately delete this message and all of its attachments, if any. ? Click here to submit conditions This email and any content within or attached hereto from Sun West Mortgage Company, Inc. is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named on this email. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this email information is strictly prohibited, and that the documents should be returned to this office immediately by email. Receipt by anyone other than the intended recipient is not a waiver of any privilege. Please do not include your social security number, account number, or any other personal or financial information in the content of the email. Should you have any questions, please call (800) 453 7884.
