java - Generating Table of Contents using XMLWorker -


i generating pdf using itext , xmlworker. there problem need generate toc pdf page no. having mt section headings in list. list can generate toc without page no. our requirement need page no also. below list containing section details.

list<string> sectionlist=new arraylist<string>(); sectionlist.add("section1"); sectionlist.add("section2"); sectionlist.add("section3"); sectionlist.add("section4"); sectionlist.add("section5");` 

my clob object is

string pdfstring="<h1>section1</h1><p>some content section1</p>" +             "<h1>section2</h1><p>some content section2</p>" +             "<h1>section3</h1><p>some content section3</p>" +             "<h1>section4</h1><p>some content section4</p>" +             "<h1>section5</h1><p>some content section5</p>"; 

section contents more 1 page need page no in toc. there wat achieve this. note sample have many sections , subsections.

as of xml worker 5.5.4 source, doesn't seem create "chapters" anywhere required creating table of contents. can create own tag , build xml worker how process it. browsers may ignore unknown tag , not display it, careful.

how generate table of contents “toc” itext?

javadoc method telling xml worker how process new tag


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -