[iText-questions] Re: Spacing or leaders between text fragments

2006-03-04 Thread Bruno Lowagie

Chris Dole wrote:

Hello, I've been looking for a way to get space or leaders between text 
fragments, as in a table of contents between title and page number, or a 
header/footer between header/footer information.

TOC example:

Chapter 1 
.. 4


There's no automatic way to tell iText:
- this is a Chunk aligned to the left
- that is a Chunk aligned to the right
- now put dots between them

You could use PdfContentByte to draw some
at an absolute position (one left aligned,
the other right aligned), then calculate
the length of the strings that were drawn
and use that information to draw the dotted
line, but I don't think this is the best
solution in your case (see below).


Footer example:

Company Name  Page 4Document Subject


I'd opt for a PdfPTable with the borders set to NO_BORDER.
Add the table in the onEndPage method of a PageEvent.


Someone Wrote a Heading Too Long to Fit on the Page, or
Perhaps Indenting Reduced Space  4


This is indeed the more complex version of the first
question. I can think of two possible solutions, but
they aren't very elegant.

Or you create the chunk with the ToC entry, calculate
its length and perform some actions based on this length:
- split it if it doesn't fit the page width
- add dots until the page width minus the length of
  the chunk with the page number is reached.

Or you work with a 2-column table.
You create an Chunk containing only one space character
and a genericTag. You add this Chunk to every cell in
the first column and draw a dashed/dotted line in the
onGenericTag method of a Page event that starts at the
lower right coordinate of the rectangle passed to the
onGenericTag method and ends add the right border of
the first column.

If I come up with another idea, I'll let you know ;-)

br,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Re: iText in Action

2006-03-04 Thread David Thielen
And if you're going to buy, offer to pre-order. This book would be a big
help to anyone using iText

 
David Thielen
www.windwardreports.com
303-499-2544

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bruno
Lowagie
Sent: Saturday, March 04, 2006 3:25 AM
To: 'itext-questions@lists.sourceforge.net'
Subject: [iText-questions] Re: iText in Action

bruno wrote:
> I got a contract with five milestones.
> - Chapter 1 (4 reviewers)
> - 1/3 of the book (15 reviewers)
> - 2/3 of the book (10 reviewers)
> - 3/3 of the book (?)
> - production version
> 
> I have now reached the fourth milestone.
> I am expecting a GO or a NO GO tonight.
> Or maybe a 'GO, on condition that...'.

I didn't get a GO; I didn't get a NO GO.
I didn't get a 'GO, on condition that...'

The publisher is undecided.

We had a three hour phone call, but it comes
to this: the manuscript is good, but there
are some doubts if the book will sell well
enough...

I won't discuss further details on this list
(nor anywhere else for the moment), please do
not start a discussion here, instead I would
like to invite you to post a message on this
blog page: http://jroller.com/page/blowagie

I'm not asking for a complete list of arguments,
just post YES or NO, and add your first name,
your function (Java developer, .NET developer,...)
and your country/state. This last piece of
information is very important, because if we
continue with the 3/3 review the publisher wants
to have a better geographical distribution of
the reviewers.

I remember turning down quite some people who
asked me to review the book. This was because
the publisher told me he had enough people to
review the book. Now the list of reviewers is
open again ;-)

Thanks,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Spacing or leaders between text fragments

2006-03-04 Thread Chris Dole
Hello, I've been looking for a way to get space or leaders between text 
fragments, as in a table of contents between title and page number, or a 
header/footer between header/footer information.

TOC example:

Chapter 1 
.. 4

Footer example:

Company Name  Page 4Document Subject

Is there some way to tell iText to auto-fill spaces/dots between two or three 
fragments, taking the whole page width?

Then there's the more advanced case of a long heading in a TOC wrapping, for 
extra credit ;-)

Example:

Someone Wrote a Heading Too Long to Fit on the Page, or
Perhaps Indenting Reduced Space  4

Thanks for any tips/pointers!

Regards,

Chris Dole
SAS Institute, Inc.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Re: iText in Action

2006-03-04 Thread Bruno Lowagie

bruno wrote:

I got a contract with five milestones.
- Chapter 1 (4 reviewers)
- 1/3 of the book (15 reviewers)
- 2/3 of the book (10 reviewers)
- 3/3 of the book (?)
- production version

I have now reached the fourth milestone.
I am expecting a GO or a NO GO tonight.
Or maybe a 'GO, on condition that...'.


I didn't get a GO; I didn't get a NO GO.
I didn't get a 'GO, on condition that...'

The publisher is undecided.

We had a three hour phone call, but it comes
to this: the manuscript is good, but there
are some doubts if the book will sell well
enough...

I won't discuss further details on this list
(nor anywhere else for the moment), please do
not start a discussion here, instead I would
like to invite you to post a message on this
blog page: http://jroller.com/page/blowagie

I'm not asking for a complete list of arguments,
just post YES or NO, and add your first name,
your function (Java developer, .NET developer,...)
and your country/state. This last piece of
information is very important, because if we
continue with the 3/3 review the publisher wants
to have a better geographical distribution of
the reviewers.

I remember turning down quite some people who
asked me to review the book. This was because
the publisher told me he had enough people to
review the book. Now the list of reviewers is
open again ;-)

Thanks,
Bruno


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions