The rotation pivot is always placed at (0,0) so if the object is in the
midlle of the page and is rotated 90 degrees counter-clockwise it will end
outside the page on the left. With templates it's the same. The objects are
clipped to the tempate bounding box and if they are outside they don't show
up. The easiest approach is to reference the objects to (0,0) and then
rotate and translate them. The reading of the PDF reference is essential to
understand all this transformations.
The setYLine() determines the Y position of the first line bounded by the
columns. If the Y position is outside the columns nothing shows. The
alignment has nothing to do with the text showing up.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Thomas McKay [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, March 07, 2002 20:32
> To:   Jeff Kolesky; Paulo Soares; [EMAIL PROTECTED]
> Subject:      RE: [iText-questions] drawing rotated text?
> 
> I was just playing with ColumnText and couldn't get the text to show up
> with
> just a call to ct.go().  Looking at the example, I ended up calling
> 
>       columnText.go();
>       columnText.setYLine( 8.0f * 72 );
>       columnText.setAlignment( Element.ALIGN_JUSTIFIED );
>       columnText.go();
> 
> Not sure where the problem lies, but leaving out either the setYLine() or
> the setAlignment() calls resulted in no text showing up.
> 
> Tom
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff
> Kolesky
> Sent: Thursday, March 07, 2002 3:06 PM
> To: Paulo Soares; [EMAIL PROTECTED]
> Subject: RE: [iText-questions] drawing rotated text?
> 
> 
> I want to rotate a piece of text 90 degrees counter-clockwise.  I wrote
> the
> code below with no attempts at using rotation and the string shows up
> fine.  When I added in the saveState(), concatCTM(), and restoreState()
> method calls, the text does not show up at all.  Is there a step I am
> missing?
> 
> 
>           // oneGenericIdBlock is a PdfTemplate
>                      oneGenericIdBlock.saveState();                // new
> code
>                      // cos, sin, -sin, cos, 0, 0
>                      oneGenericIdBlock.concatCTM(0, 1, -1, 0, 0, 0);
> //
> new code
>                      ColumnText ct = new ColumnText(oneGenericIdBlock);
>                      ct.setSimpleColumn(x, textY,
>                                         x + (2f * BUBBLE_RADIUS),
>                                         y,
>                                         7, Element.ALIGN_CENTER);
>                      ct.addText(new Chunk("9", bubbleFont));
>                      ct.go();
>                      oneGenericIdBlock.restoreState();             // new
> code
> 
> 
> Thanks.
> 
> Jeff
> 
> 
> At 10:41 AM 3/7/2002 +0000, you wrote:
> >Yes. Apply PdfContentByte.concatCTM() probably between a
> >saveState()/restoreState().
> >
> >Best Reards,
> >Paulo Soares
> >
> > > -----Original Message-----
> > > From: Jeff Kolesky [SMTP:[EMAIL PROTECTED]]
> > > Sent: Wednesday, March 06, 2002 19:49
> > > To:   [EMAIL PROTECTED]
> > > Subject:      [iText-questions] drawing rotated text?
> > >
> > > Is there a way to draw rotated text through a ColumnText object?
> > >
> > > Thanks.
> > >
> > >
> > > _______________________________________________
> > > iText-questions mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to