That may be a bug but a viewer one. Acrobat will assume a link if the text 
looks like a link. You can see that by omitting extlink.setAnchor(). There's an 
option in Acrobat preferences to turn it off ("Automatically detect URLs from 
text").

Paulo

________________________________
From: Black, Brian CTR NAVSEA [[email protected]]
Sent: Thursday, January 08, 2009 12:39 AM
To: [email protected]
Cc: Sanecki, Jeremy CTR NAVSEA, Nsdsa
Subject: [iText-questions] Possible anchor bug


Please examine the following simplified code:

          Paragraph tmppara = new Paragraph();
          Chunk extlink = new Chunk("https://www.displayed.url";, basicfont);
          extlink.setAnchor("https://www.actualurl.com?something=this";);
          extlink.setUnderline(.1f, -1f);
          tmppara.add(extlink);


...'tmppara' is added to a table cell, and the table is added to a Paragraph, 
then that Paragraph is added to the Document.

When I view the main document (PDF) and place the cursor over the link produced 
above, I get a hand cursor with 'w' in it, showing the correct anchor and if I 
click the mouse it opens the browser and goes to the correct link.

But if I move the mouse pointer around carefully - usually just below the 
anchor underline, a hand cursor appears without the 'w' displaying only the 
text in the Chunk, as if this were a correct link, BUT IT IS NOT. And if I 
click the mouse a browser will open, attempting to access this text in the 
Chunk (www.displayed.url<file://www.displayed.url>).

How do I get it to stop doing this?  Is this a bug?

This happens with both the Anchor object and the Chunk object


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to