Hmm... an argument could be made that not firing the OnGenericTag code a
bug. onGenericTag's rect parameter might be a little odd to calculate,
but it should be possible.
And while you could make the same argument about the localGoTo, there's
a Significant Technical Hurdle there. Goto's are link annotations on a
page. A PdfTemplate can exist on multiple pages. I haven't gone
through the relevant code, but its also possible that the PdfTemplate
isn't a part of any page when we'd normally tack on the link annotation.
In the meanwhile, you'll just have to work around the problem.
You'll have to create the link annotation[s] yourself with one of the
PdfAnnotation.createLink() overrides. Don't forget to call setPage() on
the returned link object before calling PdfWriter.addAnnotation(). Note
that you can use the same PdfAnnotation instance on multiple pages IF
they all link to exactly the same place & page, and all exist in the
same coordinates on each page.
PS: If you use one of the createLink()'s that takes a PdfAction, you
might be interested in the PdfAction constants FIRSTPAGE, PREVPAGE,
NEXTPAGE, and LASTPAGE. That would allow you to reuse the same link
annotation over and over for "prev" or "next" arrows.
--Mark Storer
Senior Software Engineer
Cardiff.com
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
________________________________
From: Colin Cheng [mailto:[email protected]]
Sent: Thursday, March 24, 2011 2:49 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] problems about chunk
I understand. However, I have to use template, cause I don't
know the correct text yet when I add the template.
On Thu, Mar 24, 2011 at 2:29 PM, Nurettin DAG
<[email protected]> wrote:
I believe those functions are only available when you
add the chunk via document.add but not through template.
On Thu, Mar 24, 2011 at 4:21 PM, Colin Cheng
<[email protected]> wrote:
Hi,
I'm not sure if the following issues are bugs or
not.
1. When I try to use Chunk.setGenericTag()
function, and the chunk is added to a PdfTemplate, then it will not
trigger the page's onGenericTag event.
2. When the chunk is about to be added to a
PdfTemplate, the chunk's setLocalGoto() will not function.
Please advise. Thanks a lot.
Colley
------------------------------------------------------------------------
------
Enable your software for Intel(R) Active
Management Technology to meet the
growing manageability and security demands of
your customers. Businesses
are taking advantage of Intel(R) vPro (TM)
technology - will your software
be a part of the solution? Download the Intel(R)
Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
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
--
Nurettin DAG
------------------------------------------------------------------------
------
Enable your software for Intel(R) Active Management
Technology to meet the
growing manageability and security demands of your
customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology -
will your software
be a part of the solution? Download the Intel(R)
Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
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
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
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