Package org.apache.fop.pdf
Class PDFInfo
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFInfo
- All Implemented Interfaces:
PDFWritable
class representing an /Info object
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The standard keys in the Document Information Dictionary -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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').static Date
getTitle()
void
Adds a custom property to this Info dictionary.void
set the author stringvoid
setCreationDate
(Date date) void
setCreator
(String creator) set the creator stringvoid
set the keywords stringvoid
setModDate
(Date date) Sets the date of the last modification.void
setProducer
(String producer) set the producer stringvoid
setSubject
(String s) set the subject stringvoid
set the title stringbyte[]
toPDF()
Encodes the object as a byte array for output to a PDF file.Methods inherited from class org.apache.fop.pdf.PDFObject
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDFString
-
Constructor Details
-
PDFInfo
public PDFInfo()
-
-
Method Details
-
getProducer
- Returns:
- the producer of the document or null if not set
-
setProducer
set the producer string- Parameters:
producer
- the producer string
-
getCreator
- Returns:
- the creator of the document or null if not set
-
setCreator
set the creator string- Parameters:
creator
- the document creator
-
getTitle
- Returns:
- the title string
-
setTitle
set the title string- Parameters:
t
- the document title
-
getAuthor
- Returns:
- the author of the document or null if not set
-
setAuthor
set the author string- Parameters:
a
- the document author
-
getSubject
- Returns:
- the subject of the document or null if not set
-
setSubject
set the subject string- Parameters:
s
- the document subject
-
getKeywords
- Returns:
- the keywords for the document or null if not set
-
setKeywords
set the keywords string- Parameters:
k
- the keywords for this document
-
getCreationDate
- Returns:
- last set creation date
-
setCreationDate
- Parameters:
date
- Date to store in the PDF as creation date. Use null to force current system date.
-
getModDate
- Returns:
- last modification date
-
setModDate
Sets the date of the last modification.- Parameters:
date
- the last modification date or null if there are no modifications
-
toPDF
public byte[] toPDF()Encodes the object as a byte array for output to a PDF file. -
formatDateTime
Formats a date/time according to the PDF specification (D:YYYYMMDDHHmmSSOHH'mm').- Parameters:
time
- date/time value to formattz
- the time zone- Returns:
- the requested String representation
-
formatDateTime
Formats a date/time according to the PDF specification. (D:YYYYMMDDHHmmSSOHH'mm').- Parameters:
time
- date/time value to format- Returns:
- the requested String representation
-
getSourceDateEpoch
- Returns:
- a Date initialized from SOURCE_DATE_EPOCH or null if not set
-
put
Adds a custom property to this Info dictionary.
-