Op 9/01/2013 11:20, fireMatt schreef:
> Hi there, just getting started with itext! Great software.
>
> I have been searching for help with the annotations function. I cant for the
> life of me find the ‘CallOut’ annotation. iText i would have thought would
> have PDF’s callout function somewhere – any tips on how to generate a
> ‘Callout’ would be much appreciated.
>
> There is no 'PdfAnnotation.CreateCallOut' which is where I would expect the
> method to be...
Well, that's because from a theoretical point of view, there's no such
thing as a CallOut annotation.
You are probably referring to a free text annotation with an /IT key
equal to /FreeTextCallout and a CL key defining the callout line:
The /IT value is a name describing the intent of the free text
annotation. The following values shall be valid:
/FreeText — The annotation is intended to function as a plain free-text
annotation. A plain free-text annotation is also known as a text box
comment.
/FreeTextCallout — The annotation is intended to function as a callout.
The callout is associated with an area on the page through the callout
line specified in CL.
/FreeTextTypeWriter — The annotation is intended to function as a
click-to-type or typewriter object and no callout line is drawn.
The /CL value is an array of four or six numbers specifying a callout
line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3
y3 ] represent the starting, knee point, and ending coordinates of the
line in default user space. Four numbers [ x1 y1 x2 y2 ] represent the
starting and ending coordinates of the line.
In your case, you need to create a PdfAnnotation dictionary for a free
text annotation, and add two entries to this dictionary. One with the
value PdfName("FreeTextCallout"), another one with a PdfArray value
containing 4 or 6 PdfNumber values.
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php