Search in sources :

Example 1 with PDBorderEffectDictionary

use of com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary in project PdfBox-Android by TomRoush.

the class PDPolygonAppearanceHandler method generateNormalAppearance.

@Override
public void generateNormalAppearance() {
    PDAnnotationMarkup annotation = (PDAnnotationMarkup) getAnnotation();
    float lineWidth = getLineWidth();
    PDRectangle rect = annotation.getRectangle();
    // Adjust rectangle even if not empty
    // CTAN-example-Annotations.pdf p2
    float minX = Float.MAX_VALUE;
    float minY = Float.MAX_VALUE;
    float maxX = Float.MIN_VALUE;
    float maxY = Float.MIN_VALUE;
    float[][] pathArray = getPathArray(annotation);
    if (pathArray == null) {
        return;
    }
    for (int i = 0; i < pathArray.length; ++i) {
        for (int j = 0; j < pathArray[i].length / 2; ++j) {
            float x = pathArray[i][j * 2];
            float y = pathArray[i][j * 2 + 1];
            minX = Math.min(minX, x);
            minY = Math.min(minY, y);
            maxX = Math.max(maxX, x);
            maxY = Math.max(maxY, y);
        }
    }
    rect.setLowerLeftX(Math.min(minX - lineWidth, rect.getLowerLeftX()));
    rect.setLowerLeftY(Math.min(minY - lineWidth, rect.getLowerLeftY()));
    rect.setUpperRightX(Math.max(maxX + lineWidth, rect.getUpperRightX()));
    rect.setUpperRightY(Math.max(maxY + lineWidth, rect.getUpperRightY()));
    annotation.setRectangle(rect);
    PDAppearanceContentStream contentStream = null;
    try {
        contentStream = getNormalAppearanceAsContentStream();
        boolean hasStroke = contentStream.setStrokingColorOnDemand(getColor());
        boolean hasBackground = contentStream.setNonStrokingColorOnDemand(annotation.getInteriorColor());
        setOpacity(contentStream, annotation.getConstantOpacity());
        contentStream.setBorderLine(lineWidth, annotation.getBorderStyle(), annotation.getBorder());
        PDBorderEffectDictionary borderEffect = annotation.getBorderEffect();
        if (borderEffect != null && borderEffect.getStyle().equals(PDBorderEffectDictionary.STYLE_CLOUDY)) {
            CloudyBorder cloudyBorder = new CloudyBorder(contentStream, borderEffect.getIntensity(), lineWidth, getRectangle());
            cloudyBorder.createCloudyPolygon(pathArray);
            annotation.setRectangle(cloudyBorder.getRectangle());
            PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
            appearanceStream.setBBox(cloudyBorder.getBBox());
            appearanceStream.setMatrix(cloudyBorder.getMatrix());
        } else {
            for (int i = 0; i < pathArray.length; i++) {
                float[] pointsArray = pathArray[i];
                // first array shall be of size 2 and specify the moveto operator
                if (i == 0 && pointsArray.length == 2) {
                    contentStream.moveTo(pointsArray[0], pointsArray[1]);
                } else {
                    // entries of length 2 shall be treated as lineto operator
                    if (pointsArray.length == 2) {
                        contentStream.lineTo(pointsArray[0], pointsArray[1]);
                    } else if (pointsArray.length == 6) {
                        contentStream.curveTo(pointsArray[0], pointsArray[1], pointsArray[2], pointsArray[3], pointsArray[4], pointsArray[5]);
                    }
                }
            }
            contentStream.closePath();
        }
        contentStream.drawShape(lineWidth, hasStroke, hasBackground);
    } catch (IOException e) {
        Log.e("PdfBox-Android", e.getMessage(), e);
    } finally {
        IOUtils.closeQuietly(contentStream);
    }
}
Also used : PDAppearanceContentStream(com.tom_roush.pdfbox.pdmodel.PDAppearanceContentStream) PDAppearanceStream(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream) PDBorderEffectDictionary(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary) PDAnnotationMarkup(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup) PDRectangle(com.tom_roush.pdfbox.pdmodel.common.PDRectangle) IOException(java.io.IOException)

Example 2 with PDBorderEffectDictionary

use of com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary in project PdfBox-Android by TomRoush.

the class PDCircleAppearanceHandler method generateNormalAppearance.

@Override
public void generateNormalAppearance() {
    float lineWidth = getLineWidth();
    PDAnnotationSquareCircle annotation = (PDAnnotationSquareCircle) getAnnotation();
    PDAppearanceContentStream contentStream = null;
    try {
        contentStream = getNormalAppearanceAsContentStream();
        boolean hasStroke = contentStream.setStrokingColorOnDemand(getColor());
        boolean hasBackground = contentStream.setNonStrokingColorOnDemand(annotation.getInteriorColor());
        setOpacity(contentStream, annotation.getConstantOpacity());
        contentStream.setBorderLine(lineWidth, annotation.getBorderStyle(), annotation.getBorder());
        PDBorderEffectDictionary borderEffect = annotation.getBorderEffect();
        if (borderEffect != null && borderEffect.getStyle().equals(PDBorderEffectDictionary.STYLE_CLOUDY)) {
            CloudyBorder cloudyBorder = new CloudyBorder(contentStream, borderEffect.getIntensity(), lineWidth, getRectangle());
            cloudyBorder.createCloudyEllipse(annotation.getRectDifference());
            annotation.setRectangle(cloudyBorder.getRectangle());
            annotation.setRectDifference(cloudyBorder.getRectDifference());
            PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
            appearanceStream.setBBox(cloudyBorder.getBBox());
            appearanceStream.setMatrix(cloudyBorder.getMatrix());
        } else {
            // Acrobat applies a padding to each side of the bbox so the line is completely within
            // the bbox.
            PDRectangle borderBox = handleBorderBox(annotation, lineWidth);
            // lower left corner
            float x0 = borderBox.getLowerLeftX();
            float y0 = borderBox.getLowerLeftY();
            // upper right corner
            float x1 = borderBox.getUpperRightX();
            float y1 = borderBox.getUpperRightY();
            // mid points
            float xm = x0 + borderBox.getWidth() / 2;
            float ym = y0 + borderBox.getHeight() / 2;
            // see http://spencermortensen.com/articles/bezier-circle/
            // the below number was calculated from sampling content streams
            // generated using Adobe Reader
            float magic = 0.55555417f;
            // control point offsets
            float vOffset = borderBox.getHeight() / 2 * magic;
            float hOffset = borderBox.getWidth() / 2 * magic;
            contentStream.moveTo(xm, y1);
            contentStream.curveTo((xm + hOffset), y1, x1, (ym + vOffset), x1, ym);
            contentStream.curveTo(x1, (ym - vOffset), (xm + hOffset), y0, xm, y0);
            contentStream.curveTo((xm - hOffset), y0, x0, (ym - vOffset), x0, ym);
            contentStream.curveTo(x0, (ym + vOffset), (xm - hOffset), y1, xm, y1);
            contentStream.closePath();
        }
        contentStream.drawShape(lineWidth, hasStroke, hasBackground);
    } catch (IOException e) {
        Log.e("PdfBox-Android", e.getMessage(), e);
    } finally {
        IOUtils.closeQuietly(contentStream);
    }
}
Also used : PDAppearanceContentStream(com.tom_roush.pdfbox.pdmodel.PDAppearanceContentStream) PDAppearanceStream(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream) PDBorderEffectDictionary(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary) PDRectangle(com.tom_roush.pdfbox.pdmodel.common.PDRectangle) IOException(java.io.IOException) PDAnnotationSquareCircle(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle)

Example 3 with PDBorderEffectDictionary

use of com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary in project PdfBox-Android by TomRoush.

the class PDFreeTextAppearanceHandler method generateNormalAppearance.

@Override
public void generateNormalAppearance() {
    PDAnnotationMarkup annotation = (PDAnnotationMarkup) getAnnotation();
    float[] pathsArray = new float[0];
    if (PDAnnotationMarkup.IT_FREE_TEXT_CALLOUT.equals(annotation.getIntent())) {
        pathsArray = annotation.getCallout();
        if (pathsArray == null || pathsArray.length != 4 && pathsArray.length != 6) {
            pathsArray = new float[0];
        }
    }
    AnnotationBorder ab = AnnotationBorder.getAnnotationBorder(annotation, annotation.getBorderStyle());
    PDAppearanceContentStream cs = null;
    try {
        cs = getNormalAppearanceAsContentStream(true);
        // The fill color is the /C entry, there is no /IC entry defined
        boolean hasBackground = cs.setNonStrokingColorOnDemand(annotation.getColor());
        setOpacity(cs, annotation.getConstantOpacity());
        // Adobe uses the last non stroking color from /DA as stroking color!
        // But if there is a color in /DS, then that one is used for text.
        PDColor strokingColor = extractNonStrokingColor(annotation);
        boolean hasStroke = cs.setStrokingColorOnDemand(strokingColor);
        PDColor textColor = strokingColor;
        String defaultStyleString = annotation.getDefaultStyleString();
        if (defaultStyleString != null) {
            Matcher m = COLOR_PATTERN.matcher(defaultStyleString);
            if (m.find()) {
                int color = Integer.parseInt(m.group(1), 16);
                float r = ((color >> 16) & 0xFF) / 255f;
                float g = ((color >> 8) & 0xFF) / 255f;
                float b = (color & 0xFF) / 255f;
                textColor = new PDColor(new float[] { r, g, b }, PDDeviceRGB.INSTANCE);
            }
        }
        if (ab.dashArray != null) {
            cs.setLineDashPattern(ab.dashArray, 0);
        }
        cs.setLineWidth(ab.width);
        // see CTAN-example-Annotations.pdf
        for (int i = 0; i < pathsArray.length / 2; ++i) {
            float x = pathsArray[i * 2];
            float y = pathsArray[i * 2 + 1];
            if (i == 0) {
                if (SHORT_STYLES.contains(annotation.getLineEndingStyle())) {
                    // modify coordinate to shorten the segment
                    // https://stackoverflow.com/questions/7740507/extend-a-line-segment-a-specific-distance
                    float x1 = pathsArray[2];
                    float y1 = pathsArray[3];
                    float len = (float) (Math.sqrt(Math.pow(x - x1, 2) + Math.pow(y - y1, 2)));
                    if (Float.compare(len, 0) != 0) {
                        x += (x1 - x) / len * ab.width;
                        y += (y1 - y) / len * ab.width;
                    }
                }
                cs.moveTo(x, y);
            } else {
                cs.lineTo(x, y);
            }
        }
        if (pathsArray.length > 0) {
            cs.stroke();
        }
        // paint the styles here and after line(s) draw, to avoid line crossing a filled shape
        if (PDAnnotationMarkup.IT_FREE_TEXT_CALLOUT.equals(annotation.getIntent()) && // check only needed to avoid q cm Q if LE_NONE
        !LE_NONE.equals(annotation.getLineEndingStyle()) && pathsArray.length >= 4) {
            float x2 = pathsArray[2];
            float y2 = pathsArray[3];
            float x1 = pathsArray[0];
            float y1 = pathsArray[1];
            cs.saveGraphicsState();
            if (ANGLED_STYLES.contains(annotation.getLineEndingStyle())) {
                // do a transform so that first "arm" is imagined flat,
                // like in line handler.
                // The alternative would be to apply the transform to the
                // LE shape coordinates directly, which would be more work
                // and produce code difficult to understand
                double angle = Math.atan2(y2 - y1, x2 - x1);
                cs.transform(Matrix.getRotateInstance(angle, x1, y1));
            } else {
                cs.transform(Matrix.getTranslateInstance(x1, y1));
            }
            drawStyle(annotation.getLineEndingStyle(), cs, 0, 0, ab.width, hasStroke, hasBackground, false);
            cs.restoreGraphicsState();
        }
        PDRectangle borderBox;
        PDBorderEffectDictionary borderEffect = annotation.getBorderEffect();
        if (borderEffect != null && borderEffect.getStyle().equals(PDBorderEffectDictionary.STYLE_CLOUDY)) {
            // Adobe draws the text with the original rectangle in mind.
            // but if there is an /RD, then writing area get smaller.
            // do this here because /RD is overwritten in a few lines
            borderBox = applyRectDifferences(getRectangle(), annotation.getRectDifferences());
            // TODO this segment was copied from square handler. Refactor?
            CloudyBorder cloudyBorder = new CloudyBorder(cs, borderEffect.getIntensity(), ab.width, getRectangle());
            cloudyBorder.createCloudyRectangle(annotation.getRectDifference());
            annotation.setRectangle(cloudyBorder.getRectangle());
            annotation.setRectDifference(cloudyBorder.getRectDifference());
            PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
            appearanceStream.setBBox(cloudyBorder.getBBox());
            appearanceStream.setMatrix(cloudyBorder.getMatrix());
        } else {
            // handle the border box
            // 
            // There are two options. The handling is not part of the PDF specification but
            // implementation specific to Adobe Reader
            // - if /RD is set the border box is the /Rect entry inset by the respective
            // border difference.
            // - if /RD is not set then we don't touch /RD etc because Adobe doesn't either.
            borderBox = applyRectDifferences(getRectangle(), annotation.getRectDifferences());
            annotation.getNormalAppearanceStream().setBBox(borderBox);
            // note that borderBox is not modified
            PDRectangle paddedRectangle = getPaddedRectangle(borderBox, ab.width / 2);
            cs.addRect(paddedRectangle.getLowerLeftX(), paddedRectangle.getLowerLeftY(), paddedRectangle.getWidth(), paddedRectangle.getHeight());
        }
        cs.drawShape(ab.width, hasStroke, hasBackground);
        // rotation is an undocumented feature, but Adobe uses it. Examples can be found
        // in pdf_commenting_new.pdf file, page 3.
        int rotation = annotation.getCOSObject().getInt(COSName.ROTATE, 0);
        cs.transform(Matrix.getRotateInstance(Math.toRadians(rotation), 0, 0));
        float xOffset;
        float yOffset;
        float width = rotation == 90 || rotation == 270 ? borderBox.getHeight() : borderBox.getWidth();
        // strategy to write formatted text is somewhat inspired by
        // AppearanceGeneratorHelper.insertGeneratedAppearance()
        PDFont font = PDType1Font.HELVETICA;
        float clipY;
        float clipWidth = width - ab.width * 4;
        float clipHeight = rotation == 90 || rotation == 270 ? borderBox.getWidth() - ab.width * 4 : borderBox.getHeight() - ab.width * 4;
        extractFontDetails(annotation);
        if (document != null && document.getDocumentCatalog().getAcroForm() != null) {
            // Try to get font from AcroForm default resources
            // Sample file: https://gitlab.freedesktop.org/poppler/poppler/issues/6
            PDResources defaultResources = document.getDocumentCatalog().getAcroForm().getDefaultResources();
            if (defaultResources != null) {
                PDFont defaultResourcesFont = defaultResources.getFont(fontName);
                if (defaultResourcesFont != null) {
                    font = defaultResourcesFont;
                }
            }
        }
        // value used by Adobe, no idea where it comes from, actual font bbox max y is 0.931
        // gathered by creating an annotation with width 0.
        float yDelta = 0.7896f;
        switch(rotation) {
            case 180:
                xOffset = -borderBox.getUpperRightX() + ab.width * 2;
                yOffset = -borderBox.getLowerLeftY() - ab.width * 2 - yDelta * fontSize;
                clipY = -borderBox.getUpperRightY() + ab.width * 2;
                break;
            case 90:
                xOffset = borderBox.getLowerLeftY() + ab.width * 2;
                yOffset = -borderBox.getLowerLeftX() - ab.width * 2 - yDelta * fontSize;
                clipY = -borderBox.getUpperRightX() + ab.width * 2;
                break;
            case 270:
                xOffset = -borderBox.getUpperRightY() + ab.width * 2;
                yOffset = borderBox.getUpperRightX() - ab.width * 2 - yDelta * fontSize;
                clipY = borderBox.getLowerLeftX() + ab.width * 2;
                break;
            case 0:
            default:
                xOffset = borderBox.getLowerLeftX() + ab.width * 2;
                yOffset = borderBox.getUpperRightY() - ab.width * 2 - yDelta * fontSize;
                clipY = borderBox.getLowerLeftY() + ab.width * 2;
                break;
        }
        // clip writing area
        cs.addRect(xOffset, clipY, clipWidth, clipHeight);
        cs.clip();
        cs.beginText();
        cs.setFont(font, fontSize);
        cs.setNonStrokingColor(textColor.getComponents());
        AppearanceStyle appearanceStyle = new AppearanceStyle();
        appearanceStyle.setFont(font);
        appearanceStyle.setFontSize(fontSize);
        PlainTextFormatter formatter = new PlainTextFormatter.Builder(cs).style(appearanceStyle).text(new PlainText(annotation.getContents())).width(width - ab.width * 4).wrapLines(true).initialOffset(xOffset, yOffset).build();
        try {
            formatter.format();
        } catch (IllegalArgumentException ex) {
            throw new IOException(ex);
        }
        cs.endText();
        if (pathsArray.length > 0) {
            PDRectangle rect = getRectangle();
            // Adjust rectangle
            // important to do this after the rectangle has been painted, because the
            // final rectangle will be bigger due to callout
            // CTAN-example-Annotations.pdf p1
            // TODO in a class structure this should be overridable
            float minX = Float.MAX_VALUE;
            float minY = Float.MAX_VALUE;
            float maxX = Float.MIN_VALUE;
            float maxY = Float.MIN_VALUE;
            for (int i = 0; i < pathsArray.length / 2; ++i) {
                float x = pathsArray[i * 2];
                float y = pathsArray[i * 2 + 1];
                minX = Math.min(minX, x);
                minY = Math.min(minY, y);
                maxX = Math.max(maxX, x);
                maxY = Math.max(maxY, y);
            }
            // arrow length is 9 * width at about 30° => 10 * width seems to be enough
            rect.setLowerLeftX(Math.min(minX - ab.width * 10, rect.getLowerLeftX()));
            rect.setLowerLeftY(Math.min(minY - ab.width * 10, rect.getLowerLeftY()));
            rect.setUpperRightX(Math.max(maxX + ab.width * 10, rect.getUpperRightX()));
            rect.setUpperRightY(Math.max(maxY + ab.width * 10, rect.getUpperRightY()));
            annotation.setRectangle(rect);
            // need to set the BBox too, because rectangle modification came later
            annotation.getNormalAppearanceStream().setBBox(getRectangle());
        // TODO when callout is used, /RD should be so that the result is the writable part
        }
    } catch (IOException ex) {
        Log.e("PdfBox-Android", ex.getMessage(), ex);
    } finally {
        IOUtils.closeQuietly(cs);
    }
}
Also used : PDFont(com.tom_roush.pdfbox.pdmodel.font.PDFont) Matcher(java.util.regex.Matcher) PDAppearanceStream(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream) PDBorderEffectDictionary(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary) PDAnnotationMarkup(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup) PDResources(com.tom_roush.pdfbox.pdmodel.PDResources) IOException(java.io.IOException) PDColor(com.tom_roush.pdfbox.pdmodel.graphics.color.PDColor) AppearanceStyle(com.tom_roush.pdfbox.pdmodel.interactive.annotation.layout.AppearanceStyle) PDAppearanceContentStream(com.tom_roush.pdfbox.pdmodel.PDAppearanceContentStream) PlainText(com.tom_roush.pdfbox.pdmodel.interactive.annotation.layout.PlainText) PDRectangle(com.tom_roush.pdfbox.pdmodel.common.PDRectangle) PlainTextFormatter(com.tom_roush.pdfbox.pdmodel.interactive.annotation.layout.PlainTextFormatter)

Example 4 with PDBorderEffectDictionary

use of com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary in project PdfBox-Android by TomRoush.

the class PDSquareAppearanceHandler method generateNormalAppearance.

@Override
public void generateNormalAppearance() {
    float lineWidth = getLineWidth();
    PDAnnotationSquareCircle annotation = (PDAnnotationSquareCircle) getAnnotation();
    PDAppearanceContentStream contentStream = null;
    try {
        contentStream = getNormalAppearanceAsContentStream();
        boolean hasStroke = contentStream.setStrokingColorOnDemand(getColor());
        boolean hasBackground = contentStream.setNonStrokingColorOnDemand(annotation.getInteriorColor());
        setOpacity(contentStream, annotation.getConstantOpacity());
        contentStream.setBorderLine(lineWidth, annotation.getBorderStyle(), annotation.getBorder());
        PDBorderEffectDictionary borderEffect = annotation.getBorderEffect();
        if (borderEffect != null && borderEffect.getStyle().equals(PDBorderEffectDictionary.STYLE_CLOUDY)) {
            CloudyBorder cloudyBorder = new CloudyBorder(contentStream, borderEffect.getIntensity(), lineWidth, getRectangle());
            cloudyBorder.createCloudyRectangle(annotation.getRectDifference());
            annotation.setRectangle(cloudyBorder.getRectangle());
            annotation.setRectDifference(cloudyBorder.getRectDifference());
            PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
            appearanceStream.setBBox(cloudyBorder.getBBox());
            appearanceStream.setMatrix(cloudyBorder.getMatrix());
        } else {
            PDRectangle borderBox = handleBorderBox(annotation, lineWidth);
            contentStream.addRect(borderBox.getLowerLeftX(), borderBox.getLowerLeftY(), borderBox.getWidth(), borderBox.getHeight());
        }
        contentStream.drawShape(lineWidth, hasStroke, hasBackground);
    } catch (IOException e) {
        Log.e("PdfBox-Android", e.getMessage(), e);
    } finally {
        IOUtils.closeQuietly(contentStream);
    }
}
Also used : PDAppearanceContentStream(com.tom_roush.pdfbox.pdmodel.PDAppearanceContentStream) PDAppearanceStream(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream) PDBorderEffectDictionary(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary) PDRectangle(com.tom_roush.pdfbox.pdmodel.common.PDRectangle) IOException(java.io.IOException) PDAnnotationSquareCircle(com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle)

Aggregations

PDAppearanceContentStream (com.tom_roush.pdfbox.pdmodel.PDAppearanceContentStream)4 PDRectangle (com.tom_roush.pdfbox.pdmodel.common.PDRectangle)4 PDAppearanceStream (com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream)4 PDBorderEffectDictionary (com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDBorderEffectDictionary)4 IOException (java.io.IOException)4 PDAnnotationMarkup (com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup)2 PDAnnotationSquareCircle (com.tom_roush.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle)2 PDResources (com.tom_roush.pdfbox.pdmodel.PDResources)1 PDFont (com.tom_roush.pdfbox.pdmodel.font.PDFont)1 PDColor (com.tom_roush.pdfbox.pdmodel.graphics.color.PDColor)1 AppearanceStyle (com.tom_roush.pdfbox.pdmodel.interactive.annotation.layout.AppearanceStyle)1 PlainText (com.tom_roush.pdfbox.pdmodel.interactive.annotation.layout.PlainText)1 PlainTextFormatter (com.tom_roush.pdfbox.pdmodel.interactive.annotation.layout.PlainTextFormatter)1 Matcher (java.util.regex.Matcher)1