Example usage for org.apache.pdfbox.pdmodel.interactive.annotation PDAnnotation isInvisible

List of usage examples for org.apache.pdfbox.pdmodel.interactive.annotation PDAnnotation isInvisible

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.annotation PDAnnotation isInvisible.

Prototype

public boolean isInvisible() 

Source Link

Document

Get the invisible flag.

Usage

From source file:at.knowcenter.wag.egov.egiz.pdf.PDFUtilities.java

License:EUPL

public static float calculatePageLength(PDPage page, float effectivePageHeight, boolean legacy32,
        boolean legacy40) throws PDFIOException {
    try {//from   ww w . j av a2s. c  o m
        PDFPage my_page = new PDFPage(effectivePageHeight, legacy32, legacy40);
        PDResources resources = page.findResources();
        if (page.getContents() != null) {
            COSStream stream = page.getContents().getStream();
            // List<PDThreadBead> articles = page.getThreadBeads();
            // my_page.processMyPage(page);
            my_page.processStream(page, resources, stream);
        }
        if (!legacy32) {
            if (page.getAnnotations() != null) {
                Iterator<PDAnnotation> annotationsIt = page.getAnnotations().iterator();

                while (annotationsIt.hasNext()) {
                    PDAnnotation annotation = annotationsIt.next();
                    if (!annotation.isInvisible()) {
                        my_page.processAnnotation(annotation);
                    }
                }
            }
        }
        return my_page.getMaxPageLength();
    } catch (IOException e) {
        throw new PDFIOException("error.pdf.stamp.11", e);
    }
}