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
Nested ClassesModifier and TypeClassDescriptionstatic enumThe standard keys in the Document Information Dictionary -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringformatDateTime(Date time) Formats a date/time according to the PDF specification.protected static StringformatDateTime(Date time, TimeZone tz) Formats a date/time according to the PDF specification (D:YYYYMMDDHHmmSSOHH'mm').static DategetTitle()voidAdds a custom property to this Info dictionary.voidset the author stringvoidsetCreationDate(Date date) voidsetCreator(String creator) set the creator stringvoidset the keywords stringvoidsetModDate(Date date) Sets the date of the last modification.voidsetProducer(String producer) set the producer stringvoidsetSubject(String s) set the subject stringvoidset 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.
-