You must do each line in two parts. The first part is left aligned and
consists of the page name and the needed dots to reach the page number. The
second part is right aligned and consists of the page number.

----- Original Message ----- 
From: "tomas_philip" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Sent: Friday, October 07, 2005 11:12 PM
Subject: Re: [iText-questions] Using True Type Font and Aligning


> I am using that Api to get the width points but what
> happens is when I stamp the content some get aligned
> in the proper way while some others get distorted by
> some points,
> Say my table of content items are like this
>
> Page name 1 .............................. 1
> Page name 2 .............................. 2
> Page name 3 .............................. 3
>
> here I fix a certain length (in points) and try to
> make the string width within the limit,but it gets
> distorted by some points and it is really visible when
> i print it,
>
> Thanks In Advance
> Thomas
>
>
> --- Paulo Soares <[EMAIL PROTECTED]> wrote:
>
> > Ah, I misread the question. Use
> > BaseFont.getWidthPoint() to get the text
> > size and do any adjustments.
> >
> > ----- Original Message ----- 
> > From: "tomas_philip" <[EMAIL PROTECTED]>
> > To: "Paulo Soares" <[EMAIL PROTECTED]>
> > Sent: Friday, October 07, 2005 7:43 PM
> > Subject: Re: [iText-questions] Using True Type Font
> > and Aligning
> >
> >
> > > Hi
> > > If I get you right, we should stamp the page names
> > in
> > > the first pass and then the page numbers in the
> > second
> > > pass.
> > >
> > > Am I correct?
> > >
> > >
> > >
> > >
> > > --- Paulo Soares <[EMAIL PROTECTED]> wrote:
> > >
> > > > In the first pass you generate just the body to
> > a
> > > > dummy PDF and collect the
> > > > page numbers. In the second pass you generate
> > the
> > > > TOC and the body; you
> > > > already have the page information for the TOC.
> > > >
> > > > ----- Original Message ----- 
> > > > From: "tomas_philip" <[EMAIL PROTECTED]>
> > > > To: "Paulo Soares" <[EMAIL PROTECTED]>
> > > > Sent: Friday, October 07, 2005 2:35 PM
> > > > Subject: Re: [iText-questions] Using True Type
> > Font
> > > > and Aligning
> > > >
> > > >
> > > > > Could you please explain this
> > > > > I am not very clear about it
> > > > > Thanks In advance
> > > > >
> > > > > --- Paulo Soares <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > That can only be done with more than one
> > pass.
> > > > I'm
> > > > > > currently finishing a
> > > > > > documentation assigment for my company and I
> > do
> > > > two
> > > > > > passes and in some cases
> > > > > > three.
> > > > > >
> > > > > > ----- Original Message ----- 
> > > > > > From: "Thomas" <[EMAIL PROTECTED]>
> > > > > > To: <[email protected]>
> > > > > > Sent: Friday, October 07, 2005 2:53 AM
> > > > > > Subject: [iText-questions] Using True Type
> > Font
> > > > and
> > > > > > Aligning
> > > > > >
> > > > > >
> > > > > > > Hi
> > > > > > > I have to stamp table of contents on a pdf
> > > > file
> > > > > > using Arial font, the
> > > > > > problem
> > > > > > > that I am facing is when I use arial font
> > and
> > > > > > stamp content (Table of
> > > > > > > contents) on the pdf it is not aligned
> > > > properly.I
> > > > > > have to append the page
> > > > > > name
> > > > > > > and the page number and have to stamp the
> > > > > > resultant string which should be
> > > > > > of
> > > > > > > a specified length on an existing PDF. But
> > > > when I
> > > > > > do that the contents are
> > > > > > not
> > > > > > > properly aligned.Could any one please help
> > me
> > > > in
> > > > > > this
> > > > > > >
> > > > > > > Thanks In advance
> > > > > > >
> > > > > > > Thomas
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> -------------------------------------------------------
> > > > > > > This SF.Net email is sponsored by:
> > > > > > > Power Architecture Resource Center: Free
> > > > content,
> > > > > > downloads, discussions,
> > > > > > > and more.
> > > > > > http://solutions.newsforge.com/ibmarch.tmpl
> > > > > > >
> > > > _______________________________________________
> > > > > > > iText-questions mailing list
> > > > > > > [email protected]
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > > > > http://mail.yahoo.com
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> ______________________________________________________
> > > Yahoo! for Good
> > > Donate to the Hurricane Katrina relief effort.
> > > http://store.yahoo.com/redcross-donate3/
> > >
> >
> >
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to