Example usage for org.apache.pdfbox.pdmodel.interactive.form PDField setNoExport

List of usage examples for org.apache.pdfbox.pdmodel.interactive.form PDField setNoExport

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.form PDField setNoExport.

Prototype

public void setNoExport(boolean noExport) 

Source Link

Document

sets the field to be not exported.

Usage

From source file:org.olat.course.certificate.manager.CertificatePDFFormWorker.java

License:Apache License

private void fillField(String fieldName, String value, PDAcroForm acroForm) throws IOException {
    PDField field = acroForm.getField(fieldName);
    if (field != null) {
        if (value == null) {
            field.setValue("");
        } else {//from  w ww .j a  va  2s . c om
            field.setValue(value);
        }

        field.setReadonly(true);
        field.setNoExport(true);
    }
}