Package com.itextpdf.kernel.pdf
Class PdfDocumentInfo
java.lang.Object
com.itextpdf.kernel.pdf.PdfDocumentInfo
The class is a wrapper around
Info
dictionary from PdfDocument
root which provides utility methods to work with the Info
dictionary.
For more information about each of the PDF document info key, see ISO 32000-2 Table 349.
-
Method Summary
Modifier and TypeMethodDescriptionAdds the creation date of thePdfDocument
.Adds modification date of thePdfDocument
.Gets the author of thePdfDocument
.Gets the creator of thePdfDocument
.Gets the keywords of thePdfDocument
.getMoreInfo
(String key) Gets the value of additional key ofInfo
dictionary.Gets the producer of thePdfDocument
.Gets the subject of thePdfDocument
.getTitle()
Gets the title of thePdfDocument
.Gets the trapped of thePdfDocument
.Remove creation date from the document info dictionary.Sets the author of thePdfDocument
.setCreator
(String creator) Sets the creator of thePdfDocument
.setKeywords
(String keywords) Sets the keywords of thePdfDocument
.void
setMoreInfo
(String key, String value) Sets custom key and value intoInfo
dictionary of thePdfDocument
.void
setMoreInfo
(Map<String, String> moreInfo) Sets custom keys and values intoInfo
dictionary of thePdfDocument
.setProducer
(String producer) Sets a producer line for thePdfDocument
described by this instance.setSubject
(String subject) Sets the subject of thePdfDocument
.Sets title of thePdfDocument
.setTrapped
(PdfName trapped) Sets the trapped of thePdfDocument
.
-
Method Details
-
setTitle
Sets title of thePdfDocument
.- Parameters:
-
title
- the title to set - Returns:
-
the current
PdfDocumentInfo
instance
-
setAuthor
Sets the author of thePdfDocument
.- Parameters:
-
author
- the author to set - Returns:
-
the current
PdfDocumentInfo
instance
-
setSubject
Sets the subject of thePdfDocument
.- Parameters:
-
subject
- the subject to set - Returns:
-
the current
PdfDocumentInfo
instance
-
setKeywords
Sets the keywords of thePdfDocument
.- Parameters:
-
keywords
- the keywords to set - Returns:
-
the current
PdfDocumentInfo
instance
-
setCreator
Sets the creator of thePdfDocument
.- Parameters:
-
creator
- the creator to set - Returns:
-
the current
PdfDocumentInfo
instance
-
setProducer
Sets a producer line for thePdfDocument
described by this instance.- Parameters:
-
producer
- is a new producer line to set - Returns:
- this instance
-
setTrapped
Sets the trapped of thePdfDocument
.The value indicates whether the document has been modified to include trapping information or not.
- Parameters:
-
trapped
- trapped to set - Returns:
-
the current
PdfDocumentInfo
instance
-
getTitle
Gets the title of thePdfDocument
.- Returns:
- the title
-
getAuthor
Gets the author of thePdfDocument
.- Returns:
- the author
-
getSubject
Gets the subject of thePdfDocument
.- Returns:
- the subject
-
getKeywords
Gets the keywords of thePdfDocument
.- Returns:
- the keywords
-
getCreator
Gets the creator of thePdfDocument
.- Returns:
- the creator
-
getProducer
Gets the producer of thePdfDocument
.- Returns:
- the producer
-
getTrapped
Gets the trapped of thePdfDocument
.The value indicates whether the document has been modified to include trapping information or not.
- Returns:
- the trapped
-
addCreationDate
Adds the creation date of thePdfDocument
.- Returns:
-
the current
PdfDocumentInfo
instance
-
removeCreationDate
Remove creation date from the document info dictionary.- Returns:
- this instance.
-
addModDate
Adds modification date of thePdfDocument
.- Returns:
-
the current
PdfDocumentInfo
instance
-
setMoreInfo
Sets custom keys and values intoInfo
dictionary of thePdfDocument
.- Parameters:
-
moreInfo
- the map of keys and values to be set
-
setMoreInfo
Sets custom key and value intoInfo
dictionary of thePdfDocument
.- Parameters:
-
key
- the key -
value
- the value
-
getMoreInfo
Gets the value of additional key ofInfo
dictionary.- Parameters:
-
key
- the key to get value for - Returns:
-
the value or
null
if there is no value for such a key
-