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 ofInfodictionary.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.voidsetMoreInfo(String key, String value) Sets custom key and value intoInfodictionary of thePdfDocument.voidsetMoreInfo(Map<String, String> moreInfo) Sets custom keys and values intoInfodictionary of thePdfDocument.setProducer(String producer) Sets a producer line for thePdfDocumentdescribed 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
PdfDocumentInfoinstance
-
setAuthor
Sets the author of thePdfDocument.- Parameters:
-
author- the author to set - Returns:
-
the current
PdfDocumentInfoinstance
-
setSubject
Sets the subject of thePdfDocument.- Parameters:
-
subject- the subject to set - Returns:
-
the current
PdfDocumentInfoinstance
-
setKeywords
Sets the keywords of thePdfDocument.- Parameters:
-
keywords- the keywords to set - Returns:
-
the current
PdfDocumentInfoinstance
-
setCreator
Sets the creator of thePdfDocument.- Parameters:
-
creator- the creator to set - Returns:
-
the current
PdfDocumentInfoinstance
-
setProducer
Sets a producer line for thePdfDocumentdescribed 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
PdfDocumentInfoinstance
-
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
PdfDocumentInfoinstance
-
removeCreationDate
Remove creation date from the document info dictionary.- Returns:
- this instance.
-
addModDate
Adds modification date of thePdfDocument.- Returns:
-
the current
PdfDocumentInfoinstance
-
setMoreInfo
Sets custom keys and values intoInfodictionary of thePdfDocument.- Parameters:
-
moreInfo- the map of keys and values to be set
-
setMoreInfo
Sets custom key and value intoInfodictionary of thePdfDocument.- Parameters:
-
key- the key -
value- the value
-
getMoreInfo
Gets the value of additional key ofInfodictionary.- Parameters:
-
key- the key to get value for - Returns:
-
the value or
nullif there is no value for such a key
-