Hi, I tried the example Chap0402.java which makes paragraphs and bookmarks 
in a pdf, but only the first bookmark appears... All the others are there, 
but they are blank. Someone knows why?

I also tried this example from the Paulo Soares site examples-101.zip:

/*
* @(#)Text.java
*
* This class can be used as an example on how to use the iText library
*/

import java.awt.Color;
import java.io.*;

import com.lowagie.text.*;
import com.lowagie.text.pdf.*;

/**
* With this class you can test the iText library.
*
* @author  [EMAIL PROTECTED]
*
* @since   iText0.30
*/

public class path {

    // main method

/**
* This method generates all kinds of files.
*
* @since   iText0.30
*/

    public static void main(String[] args)
    {
        // creation of the document with a certain size and certain margins
        Document document = new Document(PageSize.A4, 50, 50, 50, 50);
        try
        {
            // creation of the different writers
            PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream("c:\\pdfnstroke.pdf"));

            document.open();
            PdfContentByte cb = writer.getDirectContent();
            cb.setLineWidth(3);
            cb.setLineCap(1);
            cb.circle(100, 100, 30);
            cb.moveTo(100, 100);
            cb.lineTo(200, 320);
            cb.stroke();
            PdfDestination d1 = new PdfDestination(PdfDestination.XYZ, 0, 0, 
0);
            PdfOutline out1 = new PdfOutline(cb.getRootOutline(), d1, "Level 
0");
            cb.addOutline(out1);
            PdfOutline out2 = new PdfOutline(out1, d1, "Level 11", false);
            cb.addOutline(out2);
            PdfOutline out21 = new PdfOutline(out1, d1, "Level 12");
            cb.addOutline(out21);
            PdfOutline out3 = new PdfOutline(out2, d1, "Level 2");
            cb.addOutline(out3);
            PdfOutline out4 = new PdfOutline(out3, d1, "Level 3");
            cb.addOutline(out4);
            document.close();
            System.out.println("FIM.");
        }
        catch (Exception de)
        {
            System.err.println(de.getMessage());
        }
    }
}


I changed the cb.AddOutline(out) for cb.AddOutline(out,"out"), since the 
first one is deprecated, and I get the same result but now it is only the 
"Level 3" bookmark that works, and it works only once...

can somebody help me with that? Someone already had this problem?

Thanks!

Peter


_________________________________________________________________
Affichez, modifiez et partagez gratuitement vos photos en ligne: 
http://photos.msn.com/support/worldwide.aspx



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to