Example usage for org.apache.pdfbox.pdmodel PDDocumentInformation setSubject

List of usage examples for org.apache.pdfbox.pdmodel PDDocumentInformation setSubject

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel PDDocumentInformation setSubject.

Prototype

public void setSubject(String subject) 

Source Link

Document

This will set the subject of the document.

Usage

From source file:org.zaproxy.zap.extension.alertReport.AlertReportExportPDF.java

License:Apache License

/**
 * adds PDF metadata to the PDF document
 *
 * @param extensionExport//from   w  ww  . j  a v a 2 s.c om
 */
private void addMetaData(ExtensionAlertReportExport extensionExport) {
    PDDocumentInformation docInfo = document.getDocumentInformation();
    docInfo.setTitle(extensionExport.getParams().getTitleReport());
    docInfo.setSubject(extensionExport.getParams().getCustomerName());
    docInfo.setKeywords(extensionExport.getParams().getPdfKeywords());
    docInfo.setAuthor(extensionExport.getParams().getAuthorName());
    docInfo.setCreator(extensionExport.getParams().getAuthorName());
    docInfo.setProducer("OWASP ZAP. Extension authors: Leandro Ferrari, Colm O'Flaherty");
}

From source file:us.kagome.pdfbox.PDFMergerExample.java

License:Apache License

private PDDocumentInformation createPDFDocumentInfo(String title, String creator, String subject) {
    LOG.info("Setting document info (title, author, subject) for merged PDF");
    PDDocumentInformation documentInformation = new PDDocumentInformation();
    documentInformation.setTitle(title);
    documentInformation.setCreator(creator);
    documentInformation.setSubject(subject);
    return documentInformation;
}