public class PDFInfo extends PDFObject
Modifier and Type | Class and Description |
---|---|
static class |
PDFInfo.StandardKey
The standard keys in the Document Information Dictionary
|
Constructor and Description |
---|
PDFInfo() |
Modifier and Type | Method and Description |
---|---|
protected static String |
formatDateTime(Date time)
Formats a date/time according to the PDF specification.
|
protected static String |
formatDateTime(Date time,
TimeZone tz)
Formats a date/time according to the PDF specification (D:YYYYMMDDHHmmSSOHH'mm').
|
String |
getAuthor() |
Date |
getCreationDate() |
String |
getCreator() |
String |
getKeywords() |
Date |
getModDate() |
String |
getProducer() |
String |
getSubject() |
String |
getTitle() |
void |
put(String key,
String value)
Adds a custom property to this Info dictionary.
|
void |
setAuthor(String a)
set the author string
|
void |
setCreationDate(Date date) |
void |
setCreator(String creator)
set the creator string
|
void |
setKeywords(String k)
set the keywords string
|
void |
setModDate(Date date)
Sets the date of the last modification.
|
void |
setProducer(String producer)
set the producer string
|
void |
setSubject(String s)
set the subject string
|
void |
setTitle(String t)
set the title string
|
byte[] |
toPDF()
Encodes the object as a byte array for output to a PDF file.
|
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, supportsObjectStream, toPDFString
public String getProducer()
public void setProducer(String producer)
producer
- the producer stringpublic String getCreator()
public void setCreator(String creator)
creator
- the document creatorpublic String getTitle()
public void setTitle(String t)
t
- the document titlepublic String getAuthor()
public void setAuthor(String a)
a
- the document authorpublic String getSubject()
public void setSubject(String s)
s
- the document subjectpublic String getKeywords()
public void setKeywords(String k)
k
- the keywords for this documentpublic Date getCreationDate()
public void setCreationDate(Date date)
date
- Date to store in the PDF as creation date. Use null to force current system date.public Date getModDate()
public void setModDate(Date date)
date
- the last modification date or null if there are no modificationspublic byte[] toPDF()
protected static String formatDateTime(Date time, TimeZone tz)
time
- date/time value to formattz
- the time zoneprotected static String formatDateTime(Date time)
time
- date/time value to formatCopyright © 2025 Apache Software Foundation. All rights reserved.