If the font is not registered what you get is plain Helvetica. Other note is
that vertical text is not supported directly in PdfPTable, there are many
layout decisions that cannot be done automatically.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: hegerich, mike [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, February 26, 2003 18:34
> To:   '[EMAIL PROTECTED]'
> Subject:      [iText-questions] Displaying Unicode characters...
> 
> Hi,
> 
> I am creating content in a PdfPTable. The string I am adding to the table
> has mixed ASCII and Japanese characters. The Japanese characters appear
> as spaces in the PDF output. I was hoping you could tell me why.
> Below is the code block.
> 
> Thx,
> Mike
> 
> 
> 
> Font font = FontFactory.getFont("Arial Unicode MS", BaseFont.IDENTITY_V,
> BaseFont.EMBEDDED);
> 
> for (int i = 0; i < m_reportTables.length; i++)
> {
>   // The data for the cell goes in this phrase.
> 
>   Phrase cellPhrase = new Phrase();
> 
>   // If the passed icon file name is not null, then create an
>   // image for this icon and add it to the cell content.
> 
>   if (iconFileName != null)
>   {
>     Image icon = Image.getInstance(Toolkit.getDefaultToolkit().
>       createImage(buildImagePath(iconFileName)), null);
> 
>      Chunk imgChunk = new Chunk(icon, 0, 0);
>      cellPhrase.add(imgChunk);
> 
>      // Also add a separator space
> 
>      Chunk spaceChunk = new Chunk(" ", font);
>      cellPhrase.add(spaceChunk);
>    }
> 
>    // Now add the textual value for the cell.
> 
>    ViewColumn firstColumn = viewableCols[0];
>    StringBuffer columnContent =
> (StringBuffer)row.get(firstColumn.getName());
> 
>    // This value contains the mixed ASCI and Japanese characters
>    String formattedValue = STSReportHelper.formatColumnValue(firstColumn,
> columnContent, m_precision);
> 
>    Chunk txtChunk = new Chunk(formattedValue, font);
>    cellPhrase.add(txtChunk);
> 
>    PdfPCell cell = new PdfPCell(cellPhrase);
>    cell.setIndent(indentation);
>    cell.setHorizontalAlignment(getCellAlignment(firstColumn.getType()));
>    cell.setBorderColor(TABLE_BORDER_COLOR);
>    cell.setBackgroundColor(bgColor);
>    cell.setPadding(TABLE_PADDING);
>    m_reportTables[i].addCell(cell);
> }
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to