Example usage for com.itextpdf.text Meta KEYWORDS

List of usage examples for com.itextpdf.text Meta KEYWORDS

Introduction

In this page you can find the example usage for com.itextpdf.text Meta KEYWORDS.

Prototype

String KEYWORDS

To view the source code for com.itextpdf.text Meta KEYWORDS.

Click Source Link

Document

The possible value of an alignment attribute.

Usage

From source file:com.poet.ar.remover.AnnotationRemover.java

/**
 * remove Creator,Subject,Producer,Author,Title,Keywords
 * @param reader/*from   w  w w  .  j a  va  2  s.c  o m*/
 * @param stamper
 */
private static void removeInfo(PdfReader reader, PdfStamper stamper) {
    Map<String, String> infos = reader.getInfo();

    infos.put(Meta.AUTHOR, "");
    infos.put(Meta.KEYWORDS, "");
    infos.put(Meta.TITLE, "");
    infos.put(Meta.SUBJECT, "");

    infos.put("Creator", "");
    infos.put("Subject", "");
    infos.put("Author", "");
    infos.put("Title", "");
    infos.put("Keywords", "");

    // this will not work ,if you want change producer , you need buy a itext license
    infos.put(Meta.PRODUCER, "");

    stamper.setMoreInfo(infos);
}