Listing Encodings for Pdf document : Font « PDF RTF « Java






Listing Encodings for Pdf document

import com.lowagie.text.pdf.BaseFont;

public class ListEncodingsPDF {
  public static void main(String[] args) {
    try {
      BaseFont bfComic = BaseFont.createFont("c:\\windows\\fonts\\arial.ttf", BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
      System.out.println("postscriptname: " + bfComic.getPostscriptFontName());
      String[] codePages = bfComic.getCodePagesSupported();
      System.out.println("All available encodings:\n\n");
      for (int i = 0; i < codePages.length; i++) {
        System.out.println(codePages[i]);
      }
    } catch (Exception e) {
      e.printStackTrace();
    } 
  }
}

           
       








itext.zip( 1,748 k)

Related examples in the same category

1.Using BaseFontUsing BaseFont
2.Pdf standard fontsPdf standard fonts
3.Register Fonts for PDF document
4.Font Extra Style: NORMALFont Extra Style: NORMAL
5.Font Extra Style: STRIKETHRUFont Extra Style: STRIKETHRU
6.Font Extra Style: UNDERLINEFont Extra Style: UNDERLINE
7.Fixed Font WidthFixed Font Width
8.Font Color By PdfContentByteFont Color By PdfContentByte
9.Font Color in PDFFont Color in PDF
10.Font Encoding PDFFont Encoding PDF
11.Illustrate fontsIllustrate fonts
12.Font SelectionFont Selection
13.Font Style 1Font Style 1
14.Font Style 2Font Style 2
15.Font Style 3Font Style 3
16.Full Font Names