That's explained in the pdf reference.

----- Original Message ----- From: "wang yun" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, March 31, 2006 11:36 PM
Subject: [iText-questions] Question about Markup inside PdfAnnotation


Dear Paulo,

I am learning PdfAnnotation. createPopup works very
well but I can not make Markup work.

What is the quadPoints? Would you please give me en
example?

Thanks a lot,

yun wang


Here is the code:

PdfReader reader = new PdfReader("old.pdf");
PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("new.pdf"));
PdfContentByte cb = stamp.getOverContent(1);
PdfWriter writer = stamp.getWriter();

String cs = "Test Only";

//Not work
float[] quadPoints = {100, 200, 300, 400 };
PdfAnnotation pa1 = PdfAnnotation.createMarkup(writer,
new Rectangle(0, 600, 200, 700), cs,
PdfAnnotation.MARKUP_HIGHLIGHT, quadPoints );
stamp.addAnnotation(pa1, 1);

//Works
PdfAnnotation pa2 = PdfAnnotation.createPopup(writer,
new Rectangle(0, 500, 200, 600), cs, true);
stamp.addAnnotation(pa2, 1);

stamp.close();


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to