Hi. Leonard.
Yes, i am trying that in Reader.
My whole problem is this.
I have created a doc, and now i try to create a bookmarks for the document,
but those are not standar bookmarks.
i want to have a list of boookmaks like
A
Any (3) ( 3) is the number of occurences of that word inside the
doc
W
Word(4)
i already have the word count, only want to create the bookmarks, but if i
use the chapter/section approach, i will have at end of the doc one page
with those chapters/bookmars and i dont want that, i just want to have the
content and the bookmarks.
any idea to create my bookmarks ?
On Wed, Nov 11, 2009 at 4:47 PM, Leonard Rosenthol <lrose...@adobe.com>wrote:
> Are you trying to run that Javascript in Reader? Reader doesn’t support
> creating stuff on the fly…
>
>
>
> Leonard
>
>
>
> *From:* lester fajardo [mailto:lefaja...@gmail.com]
> *Sent:* Wednesday, November 11, 2009 11:20 AM
> *To:* itext-questions@lists.sourceforge.net
> *Subject:* [iText-questions] add bookmark at runtime
>
>
>
> hello i am trying to add a bookmark using javascript but seems to not be
> working, i create a bookmark using standar itext procedure and 2 using js at
> document load, but only the itext-created bookmark is shown.
>
> thx in advance for any help
>
> this is my code.
>
> string jsCode = "";
>
> Document document = new Document(PageSize.LETTER, 72, 72, 60, 50);
>
> PdfWriter writer = PdfWriter.GetInstance(document, new
> FileStream("test.pdf", FileMode.Create));
>
> document.Open();
>
> // add a test chapter
> Chapter chapter1 = new Chapter(new Paragraph("bookmark 1"), 1);
> chapter1.BookmarkOpen = true;
> doc.Add(chapter1);
>
> // sample code taken from the
> http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/AcroJS.pdffile
>
>
> // add more bookmarks using javascript
> jsCode += " this.bookmarkRoot.createChild( 'bookmark 2',''); \r ";
>
> // add a child to the first book mark created "bookmark 1"
> // pointer to the bookmark
> jsCode += " var bm = bookmarkRoot.children[0];\r ";
>
> jsCode += " bm.createChild( 'bookmark3',''); ";
>
> PdfAction jsAction = PdfAction.JavaScript(jsCode, writer);
>
> writer.AddJavaScript(jsAction);
>
>
> document.Close();
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 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/
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
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/