I am trying to add enough rows a table to fill up 1 page, but not overflow
the page.

 

How (and where) do I detect when the page is full so I can stop?

 

Thanks, Bill

 

From: Cameron Laird [mailto:[email protected]] 
Sent: Sunday, May 23, 2010 10:52 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] iText - nameddest over specified content

 

On Sat, May 22, 2010 at 10:28 AM, 1T3XT BVBA <[email protected]> wrote:

On 05/22/2010 05:05 PM, noemie wrote:
> Hello,
>
> I'd like to add content to an existing pdf file in order to be able to
open
> it with the 'nameddest' option.
>
> For example, I have a string in my document, let say "Note" and I'd like
to
> add the property which will be understood by nameddest option over this
> String.
>
> Is it possible ?

Yes, but probably not the way you expect it.

>   Does somebody knows how to do it ?
>

You have a String somewhere on a page in a PDF file.
This String is part of the page content.

Now you want to add a named destination.
This is NOT part of the page content.
Named destinations are stored in a different structure and they are not
aware of the content of the page.

So what you need to do, is to find the position of the String on the page.
This is not impossible, but it can be very difficult.
You need to read AND UNDERSTAND chapter 15 of the second edition of
iText in Action very well.
It's not something that can be explained in a simple mail.

Once you have the coordinates of the String, it's very easy to add the
named destination.
That's explained in chapter 7.

   ...

 

Indeed, though, it can be quite easy to add the nameddest to, for example,
the top of the known page.  In many practical cases, this meets the real
requirements of the task just as well as adding the nameddest to the exact
location of the string in question on that same page.

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to