Ok; thnks very much, that was exactly what I was needed.
Maybe that is well-known, but I am new to iText, and have no idea of what pdf 
standard says, and the docs are a bit scarce at some functions, 
for example those about popups :-)

but now when you explained it, it works, thnks very much.

If anyone else is trying to do similar here a brief: one creates "owner" 
annotation, and "target-annotation", the latter one with createPopup() 
function. Then one adds
popup to owner with setPopup() function, and one also has to add both owner and 
popup annotations to the writer object with addAnnotation() method. 

I have not seen this explained in docs, nor in some tutorial, so thnks  a lot 
for info. Without help I would never sort that out. 

While I was trying to get this to work I have also discovered, that placing one 
annotation relative to other does not really work (I tryed to use coords of 
note to calculate
position for popup, but only got mess)?

I have though solved problem by using absolute coordinates, but it might be a 
bit more logical to think in terms of popup positioning relatively to owner 
annotation.

thnks for help



----------------------------------------
> From: [EMAIL PROTECTED]
> Date: Wed, 27 Feb 2008 06:54:26 -0500
> To: [email protected]
> Subject: Re: [iText-questions] Question about annotations and animations
> 
> The location of the "popup" is controlled by the Rect of the  
> associated PopUp annotation.  If none is provided - then Acrobat gets  
> to choose.
> 
> Leonard
> 
> On Feb 27, 2008, at 2:46 AM, arthur m wrote:
> 
>>
>> Hello,
>>
>> I have a little annoying issue with annotations. I have a little  
>> project where I have several links on one pdf page (actually some  
>> titles), and beside every one of them there is a text annotation  
>> with some extra info about the link.
>> It works fine with adding annotations and placing them, I add them  
>> all to the left of the link. So, to make clear: it is english  
>> speaking pdf, with text going from left to right, and beside every  
>> sentence there is an annotation (to the left).
>> When I open that pdf in Acrobat, and then view some annotation, it  
>> is always expanded on the right hand of the document with some big  
>> annoying arrow like animation running from entire page from left to  
>> right. It looks ugly, is slow and
>> annoying. I have been looking around in iText for some code to  
>> change that behaviour, but I don't see where to find that. I am not  
>> affraid to hack in iText, but I don't really understand where is  
>> the code for that functionality?
>>
>> When I view annotations done in other pdfs from probably acrobat,  
>> there is no such problem with text annotations. When I look in  
>> annotation properties in Acrobat I see no difference from those  
>> made in acrobat (for both it says "Text note",
>> for the kind of annotation), but I do see that those made by  
>> Acrobat has a tiny shadow around, which is missing in ones made  
>> with iText. But I guess that is only cosmetics, however those made  
>> by iText are expanding always on the right-end
>> margin with arrow over entire pdfs witdth.
>>
>> I know you like code snippets so here is the place where annotation  
>> is done:
>>
>>      Chunk c = new Chunk(title);
>>              c.setLocalDestination(title);
>>              c.getFont().setSize(10);
>>              c.setAction(PdfAction.gotoRemotePage(file,title,title.length 
>> (),true,true));
>>              float v = writer.getVerticalPosition(false) - 3.0f;
>>              note = PdfAnnotation.createText(writer, new Rectangle(15f, 
>> 10f,pdf.leftMargin()+50,v),"Abstract",abstr,false,"Note" );
>>              note.setColor(Color.yellow);
>>              writer.addAnnotation(note);
>>              pdf.add( new Paragraph(c) );            
>>              new PdfOutline(out,PdfAction.gotoLocalPage(title,false), title);
>>
>> So how to make annotation expand for example at the lower right  
>> corner of annotation instead?
>>
>> best regards
>> /arthur
>> _________________________________________________________________
>> Express yourself instantly with MSN Messenger! Download today it's  
>> FREE!
>> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>> ---------------------------------------------------------------------- 
>> ---
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> Buy the iText book: http://itext.ugent.be/itext-in-action/
>>
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to