private void calcBBox(PDType3Font font) throws IOException { double minX = 0; double maxX = 0; double minY = 0; double maxY = 0; for (int index = 0; index <= 255; ++index) { PDType3CharProc charProc = font.getCharProc(index); if (charProc == null) { continue; } PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox == null) { continue; } minX = Math.min(minX, glyphBBox.getLowerLeftX()); maxX = Math.max(maxX, glyphBBox.getUpperRightX()); minY = Math.min(minY, glyphBBox.getLowerLeftY()); maxY = Math.max(maxY, glyphBBox.getUpperRightY()); } fontBBox = new PDRectangle((float) minX, (float) minY, (float) (maxX - minX), (float) (maxY - minY)); }
PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox != null)
try PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox == null)
if (charProc != null) { BoundingBox fontBBox = t3Font.getBoundingBox(); PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox != null) {
PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox != null)
try PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox == null)
try PDRectangle glyphBBox = charProc.getGlyphBBox(); if (glyphBBox == null)