This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 30, 2013, 9:54 AM
21 Posts

Create PDF - Font size

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: pdf,itextpdf
  • Replies: 2
 
Hi all,

I'm creating PDF document using iTextPDF and i'm trying to adjust the font size to 9.
I got error using below code.

Can you guys help me and tell which part is wrong... TQ. 

var SFont:com.itextpdf.text.Font =  new com.itextpdf.text.Font();
SFont.setStyle(com.itextpdf.text.Font.FontFamily.HELVETICA, 9 );


Thanks guys... 


Apr 30, 2013, 5:00 PM
17 Posts
Re: Create PDF - Font size
to define the fontsize I use

private static final Font defaultText = new Font(Font.FontFamily.HELVETICA,
            9, Font.NORMAL); 
May 6, 2013, 5:17 AM
3 Posts
Re: Create PDF - Font size
  Font normalfont     = new Font(Font.HELVETICA,  8, Font.NORMAL);

If you want to reduce the font size inside a table cell then add the following line

table.addCell(new Phrase("Abc", smallfont)) 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal