Hi, there.

I have a problem with PdfContentByte.addOutline(), as following:

I created 4 outLines( eg. foo, bar, tar, mono ) with the same parent (Root)
without any problem.
Then I loop through my objects and put their names as sub-outLines under
above metioned
4 outLines, depending on the object type.  Here is the code snipe:

           for ( int i = 0; i<objectVector.size(); i++) {

                objectType theObject =
(objectType)objectVector.elememntAt(i);
                PdfDestination myDestination = new PdfDestination(//blar
blar here);  //psedo code
                if ( theObject.type == 1 ) {
                    cb.addOutline(new PdfOutline(foo, myDestination,
theObject.name)); 
                } else if ( theDo.type == 2 ) {
                    cb.addOutline(new PdfOutline(bar, myDestination,
theObject.name));
                } else if ( theDo.type == 3 ) {
                    cb.addOutline(new PdfOutline(tar, myDestination,
theObject.name));
                } else if ( theDo.type == 0 ) {
                    cb.addOutline(new PdfOutline(mono, myDestination,
theObject.name));
                }
          }

The resulted PDF files turns out that only the first a few objects' name
showing under (foo, bar, tar, or mono) outLines.

If I decide to put every object's name as a sub-outLine under "foo" (
disregard the object type ), like this:

         for ( int i = 0; i<objectVector.size(); i++) {

                objectType theObject =
(objectType)objectVector.elememntAt(i);
                PdfDestination myDestination = new PdfDestination(//blar
blar here);  //psedo code
                cb.addOutline(new PdfOutline(foo, myDestination,
theObject.name)); 
          }

, then they all show up under "foo". 

It strikes to me that the cb.addOutline() has some limitation on adding new
sub-outLines.

Or did I miss something here?  Please help.

Thanks a lot,

Don

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to