Example usage for com.itextpdf.text Font STRIKETHRU

List of usage examples for com.itextpdf.text Font STRIKETHRU

Introduction

In this page you can find the example usage for com.itextpdf.text Font STRIKETHRU.

Prototype

int STRIKETHRU

To view the source code for com.itextpdf.text Font STRIKETHRU.

Click Source Link

Document

this is a possible style.

Usage

From source file:adams.core.io.PdfFont.java

License:Open Source License

/**
 * Generates a list of font faces./* w w w  . j  a v  a2  s.  c om*/
 *
 * @return      the list of font faces
 */
public String[] getFontFaces() {
    List<String> result;

    result = new ArrayList<String>();
    if ((m_FontFace & Font.BOLD) == Font.BOLD)
        result.add(BOLD);
    if ((m_FontFace & Font.ITALIC) == Font.ITALIC)
        result.add(ITALIC);
    if ((m_FontFace & Font.STRIKETHRU) == Font.STRIKETHRU)
        result.add(STRIKETHRU);
    if ((m_FontFace & Font.UNDERLINE) == Font.UNDERLINE)
        result.add(UNDERLINE);
    if (result.size() == 0)
        result.add(NORMAL);

    return result.toArray(new String[result.size()]);
}

From source file:adams.core.io.PdfFont.java

License:Open Source License

/**
 * Turns the font style name into the constant of the font style.
 *
 * @param name   the font style name//from   w  ww.  j  av  a 2 s.  c o  m
 * @return      the font style identifier
 */
public static int getFontFace(String name) {
    int result;

    if (name.equals(BOLD))
        result = Font.BOLD;
    else if (name.equals(ITALIC))
        result = Font.ITALIC;
    else if (name.equals(STRIKETHRU))
        result = Font.STRIKETHRU;
    else if (name.equals(UNDERLINE))
        result = Font.UNDERLINE;
    else
        result = 0;

    return result;
}

From source file:com.norbsoft.pdfconverter.helpers.PDFHelper.java

License:Open Source License

public PDFHelper(Context context, String fontUrl) {
    this.context = context;
    try {/*from  w w  w . j  a  va2 s  .  com*/
        baseFont = BaseFont.createFont(fontUrl, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
    } catch (DocumentException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    normal = new Font(baseFont, 10, Font.NORMAL);
    bold = new Font(baseFont, 10, Font.BOLD);
    strike = new Font(baseFont, 10, Font.STRIKETHRU);

}