Java Code Examples for org.apache.pdfbox.pdmodel.PDDocumentInformation#setKeywords()

The following examples show how to use org.apache.pdfbox.pdmodel.PDDocumentInformation#setKeywords() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AlertReportExportPDF.java    From zap-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * adds PDF metadata to the PDF document
 *
 * @param extensionExport
 */
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");
}
 
Example 2
Source File: ReportExportPDF.java    From zap-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * adds PDF metadata to the PDF document
 *
 * @param extensionExport
 */
private void addMetaData(ExtensionExportReport extensionExport) {
    PDDocumentInformation docInfo = document.getDocumentInformation();
    docInfo.setTitle(extensionExport.extensionGetTitle());
    docInfo.setSubject(extensionExport.extensionGetFor());
    docInfo.setKeywords("");
    docInfo.setAuthor(extensionExport.extensionGetBy());
    docInfo.setCreator(extensionExport.extensionGetBy());
    docInfo.setProducer("OWASP ZAP");
}