PdfContentByte cb = writer.getDirectContent();
            AffineTransform af = new AffineTransform();
            af.translate(50, 400);
            af.scale(.2, 1);
            cb.transform(af);
            Phrase ph = new Phrase("This is a string to test the incredible
shrinking horizontal dimension.");
            ColumnText ct = new ColumnText(cb);
            ct.setSimpleColumn(ph, 0, 0, 100, -400, 16,
Element.ALIGN_JUSTIFIED);
            ct.go();

Best Regards,
Paulo Soares

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, June 24, 2003 10:25
> To:   Paulo Soares
> Cc:   [EMAIL PROTECTED]
> Subject:      [iText-questions] R�f. : RE: Font scale ?
> 
> 
> It's a good idea to do a transformation on a columntext but how can I do
> that ?
> Thanks,
> 
> Pierre
> ><//�>
> 
> 
> 
> 
>  
> 
>                     Paulo Soares
> 
>                     <[EMAIL PROTECTED]        Pour :
> "'[EMAIL PROTECTED]'"                           
>                     iste.pt>             <[EMAIL PROTECTED]>
> 
>                                          cc :
> [EMAIL PROTECTED]                        
>                     23/06/03             Objet :      RE: Font scale ?
> 
>                     16:01
> 
>  
> 
>  
> 
> 
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From:         [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]
> > Sent:         Monday, June 23, 2003 14:42
> > To:           Paulo Soares
> > Cc:           [EMAIL PROTECTED]
> > Subject:           Font scale ?
> >
> >
> >
> > Hello,
> >
> > Is it possible to put a "scale" on a font ?
> >
>            Not for the moment using Chunks. It can be done with
> PdfContentByte
> but you'll have to do all the calculations yourself. If all the text is
> horizontally scaled you can use a ColumnText and a transformation. Links
> and
> annotations will be in the wrong positions, though.
> 
> > Finally, that's what I want to control :
> >
> > (Embedded image moved to file: pic17090.pcx)
> >
> > I tried this : (getEchelle() returns a percentage)
> >
> >             BaseFont bf =
> BaseFont.createFont(feuilleDeStyle.getPolice(),
> > BaseFont.WINANSI, BaseFont.EMBEDDED);
> >             Font font = new Font(bf, feuilleDeStyle.getCorps(),
> > feuilleDeStyle.getStyle(), Color.BLACK);
> >             if (feuilleDeStyle.getEchelle() != 1)
> >             {
> >                 int widths[] = bf.getWidths();
> >                 for (int k = 0; k < widths.length; ++k)
> >                 {
> >                     widths[k] *= (feuilleDeStyle.getEchelle());
> >                 }
> >                 bf.setForceWidthsOutput(true);
> >             }
> >             return font;
> >
> > but this only change the space between the origin of two consecutive
> > character, and I'd like to force also the character to be "scaled", the
> > changes seem to be applied on each font I create after even if its scale
> > equals 1.0 ....
> >
>            The fonts are cached by default but you can create a font out
> of
> the
> cache with other factory method.
> 
>            Best Regards,
>            Paulo Soares
> 
> > Thanks.
> >
> > Pierre
> > ><//�> << File: pic17090.pcx >>
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to