Example usage for org.apache.pdfbox.multipdf Overlay setAllPagesOverlayPDF

List of usage examples for org.apache.pdfbox.multipdf Overlay setAllPagesOverlayPDF

Introduction

In this page you can find the example usage for org.apache.pdfbox.multipdf Overlay setAllPagesOverlayPDF.

Prototype

public void setAllPagesOverlayPDF(PDDocument allPagesOverlayPDF) 

Source Link

Document

Sets the all pages overlay PDF.

Usage

From source file:org.deidentifier.arx.certificate.resources.Watermark.java

License:Apache License

/**
 * Marks the document/*from ww w .ja v  a2s . c o m*/
 * @param document
 * @throws IOException
 */
public void mark(PDDocument document) throws IOException {

    Overlay overlay = new Overlay();
    overlay.setInputPDF(document);
    overlay.setAllPagesOverlayPDF(watermark);
    overlay.setOverlayPosition(Overlay.Position.BACKGROUND);
    overlay.overlay(new HashMap<Integer, String>());
}