Example usage for org.apache.pdfbox.pdmodel.font PDFontDescriptor getItalicAngle

List of usage examples for org.apache.pdfbox.pdmodel.font PDFontDescriptor getItalicAngle

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.font PDFontDescriptor getItalicAngle.

Prototype

public float getItalicAngle() 

Source Link

Document

This will get the italic angle for the font.

Usage

From source file:net.timendum.pdf.StatisticParser.java

License:Open Source License

public boolean isItalic(PDFontDescriptor descriptor) {
    if (descriptor.getItalicAngle() != 0f) {
        return true;
    }//from w ww  .j a v  a  2  s  .co  m
    if ((descriptor.getFlags() & FLAG_ITALIC) == FLAG_ITALIC) {
        return true;
    }
    if (descriptor.getFontName() != null && descriptor.getFontName().indexOf("Italic") > -1) {
        return true;
    }
    return false;
}