Search in sources :

Example 1 with PreflightType3Stream

use of org.apache.pdfbox.preflight.font.util.PreflightType3Stream in project pdfbox by apache.

the class Type3FontValidator method getWidthFromCharProc.

/**
 * Parse the Glyph description to obtain the Width
 *
 * @return the width of the character
 */
private float getWidthFromCharProc(PDType3CharProc charProc) throws IOException {
    PreflightPath vPath = context.getValidationPath();
    PreflightType3Stream parser = new PreflightType3Stream(context, vPath.getClosestPathElement(PDPage.class), charProc);
    parser.showType3Character(charProc);
    return parser.getWidth();
}
Also used : PDPage(org.apache.pdfbox.pdmodel.PDPage) PreflightType3Stream(org.apache.pdfbox.preflight.font.util.PreflightType3Stream) PreflightPath(org.apache.pdfbox.preflight.PreflightPath)

Aggregations

PDPage (org.apache.pdfbox.pdmodel.PDPage)1 PreflightPath (org.apache.pdfbox.preflight.PreflightPath)1 PreflightType3Stream (org.apache.pdfbox.preflight.font.util.PreflightType3Stream)1