There's nothing to align here, all the cells have exactly the space to put a
line. Try some text like "a row\nother row" in one of the cells to see the
alignment work.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: Cezar FLOROIU [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 04, 2003 12:31
> To: Paulo Soares; [EMAIL PROTECTED]
> Subject: RE: [iText-questions] Two questions. Please help
>
> Take a look.
>
> try {
> Document document = new Document(PageSize.A4, 50, 50, 50, 50);
>
> try {
> PdfWriter writer = PdfWriter.getInstance(document, new
> FileOutputStream("test.pdf"));
> document.open();
> PdfPTable table = new PdfPTable(1);
>
> PdfPCell c1 = new PdfPCell(new Phrase("Row 1"));
> PdfPCell c2 = new PdfPCell(new Phrase("Row 2"));
>
> c1.setVerticalAlignment(Element.ALIGN_TOP);
> c2.setVerticalAlignment(Cell.ALIGN_BOTTOM);
>
> table.addCell(c1);
> table.addCell(c2);
>
> document.add(table);
> } catch(Exception ex) {
> ex.printStackTrace();
> }
>
> document.close();
>
> } catch (Exception ex) {
> ex.printStackTrace();
> }
>
> -----Original Message-----
> From: Paulo Soares [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 04, 2003 2:15 PM
> To: 'Cezar FLOROIU'; [EMAIL PROTECTED]
> Subject: RE: [iText-questions] Two questions. Please help
>
>
> You must have Element.ALIGN_TOP, Element.ALIGN_MIDDLE or
> Element.ALIGN_BOTTOM and don't answer "something like this", programming
> is
> an exact science and if you don't tell exactly what you did you'll receive
> exactly 0 answers. All the alignments work. If you think they don't, post
> a
> small runnable code sample with the alleged problem.
>
> Best Regards,
> Paulo Soares
>
> > -----Original Message-----
> > From: Cezar FLOROIU [SMTP:[EMAIL PROTECTED]
> > Sent: Friday, July 04, 2003 12:18
> > To: Paulo Soares; [EMAIL PROTECTED]
> > Subject: RE: [iText-questions] Two questions. Please help
> >
> > Of course, but when I try to make
> cell.setVerticalAlignment(Alignment_TOP)
> > (or something like this, I don't remember exactly the method) nothing
> > happens. The bottom alignments works but not the top one.
> >
> >
> > -----Original Message-----
> > From: Paulo Soares [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 04, 2003 2:06 PM
> > To: 'Cezar FLOROIU'; [EMAIL PROTECTED]
> > Subject: RE: [iText-questions] Two questions. Please help
> >
> >
> > I have one question:
> >
> > 1 - Did you read the tutorial?
> >
> > Best Regards,
> > Paulo Soares
> >
> > > -----Original Message-----
> > > From: Cezar FLOROIU [SMTP:[EMAIL PROTECTED]
> > > Sent: Friday, July 04, 2003 0:20
> > > To: [EMAIL PROTECTED]
> > > Subject: [iText-questions] Two questions. Please help
> > >
> > > Hi
> > >
> > > Please help me, I have two question:
> > >
> > > 1. How can I align vertically a text in a PdfPCell ?
> > >
> > > 2. Is it possible to encrypt the PDF document ?
> > >
> > > Thanks,
> > > Cezar
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions