I don't think it can be done. None the less, lets check the source...
Okay, there's some hope:
1) Annotations can take a file and page number. Linking to itself
should work.
2) Annotations can link to a relative "named destination"
new Annotation( llx, lly, urx, ury, PdfAction.<some constant> );
The PdfAction constants are: FIRSTPAGE, LASTPAGE, NEXTPAGE, PREVPAGE
(and PRINT)
3) Annotations can link to a named location in the file (confusingly,
these are called "named destinations", but have nothing to do with 2,
above). You need to use chunk.setLocalDestination( destName ) to create
the destination, and can then use:
new Annotation( llx, lly, urx, ury, strFileName, strDestName )
--Mark Storer
Senior Software Engineer
Cardiff.com
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
________________________________
From: forest [mailto:[email protected]]
Sent: Thursday, November 25, 2010 5:31 PM
To: itext-questions
Subject: [iText-questions] Does annotation has an method which
isfunctionally equal to chucnk's setlocalgoto?
Hi guys,
I want to add an image to a pdf file ,when the image
is clicked, the document will go to a local page.I do it like this:
Image iImage = Image.GetInstance("Pre.jpg");
Chunk A = new Chunk(iImage, 0,
0).SetLocalGoto(PdfAction.PREVPAGE);
If I use image.annotation ,how can I achieve this?
Thanks 1T3XT BVBA for my previous question. By the way,How to
answer questions like this? Should I write each ">"?
Op 25/11/2010 16:45, forest schreef:
> Hi everyone,
> I want to add an image to a pdf file ,when the image is
clicked,
> the document will go to a local page.I do it like this:
> Image iImage = Image.GetInstance("Pre.jpg");
> Chunk A = new Chunk(iImage, 0,
0).SetLocalGoto(PdfAction.PREVPAGE);
> It does ok,but the HyperLink square is a little under the
image
> rectangle , why? Any hint is appreciated.
Best regards
senlin
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
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