java.lang.Object
org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
org.sejda.sambox.pdmodel.PDDocumentInformation
- All Implemented Interfaces:
COSObjectable
This is the document metadata. Each getXXX method will return the entry if
it exists or null if it does not exist. If you pass in null for the setXXX
method then it will clear the value.
- Author:
- Ben Litchfield, Gerardo Ortiz
-
Constructor Summary
ConstructorsConstructorDescriptionPDDocumentInformation(COSDictionary dictionary) Creates a new instance with a given COS dictionary. -
Method Summary
Modifier and TypeMethodDescriptionThis will get the author of the document.This will get the creation date of the document.This will get the creator of the document.getCustomMetadataValue(String fieldName) This will get the value of a custom metadata getCOSObject()rmation field for the document.This will get the keywords of the document.This will get the keys of all metadata getCOSObject()rmation fields for the document.This will get the modification date of the document.This will get the producer of the document.getPropertyStringValue(String propertyKey) Return the properties String value.This will get the subject of the document.getTitle()This will get the title of the document.This will get the trapped value for the document.voidremoveMetadataField(String fieldName) voidThis will set the author of the document.voidsetCreationDate(Calendar date) This will set the creation date of the document.voidsetCreator(String creator) This will set the creator of the document.voidsetCustomMetadataValue(String fieldName, String fieldValue) Set the custom metadata value.voidsetKeywords(String keywords) This will set the keywords of the document.voidsetModificationDate(Calendar date) This will set the modification date of the document.voidsetProducer(String producer) This will set the producer of the document.voidsetSubject(String subject) This will set the subject of the document.voidThis will set the title of the document.voidsetTrapped(String value) This will set the trapped of the document.Methods inherited from class org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Constructor Details
-
PDDocumentInformation
public PDDocumentInformation() -
PDDocumentInformation
Creates a new instance with a given COS dictionary.- Parameters:
dictionary- the dictionary
-
-
Method Details
-
getPropertyStringValue
Return the properties String value.Allows to retrieve the low level date for validation purposes.
- Parameters:
propertyKey- the dictionaries key- Returns:
- the properties value
-
getTitle
This will get the title of the document. This will return null if no title exists.- Returns:
- The title of the document.
-
setTitle
This will set the title of the document.- Parameters:
title- The new title for the document.
-
getAuthor
This will get the author of the document. This will return null if no author exists.- Returns:
- The author of the document.
-
setAuthor
This will set the author of the document.- Parameters:
author- The new author for the document.
-
getSubject
This will get the subject of the document. This will return null if no subject exists.- Returns:
- The subject of the document.
-
setSubject
This will set the subject of the document.- Parameters:
subject- The new subject for the document.
-
getKeywords
This will get the keywords of the document. This will return null if no keywords exists.- Returns:
- The keywords of the document.
-
setKeywords
This will set the keywords of the document.- Parameters:
keywords- The new keywords for the document.
-
getCreator
This will get the creator of the document. This will return null if no creator exists.- Returns:
- The creator of the document.
-
setCreator
This will set the creator of the document.- Parameters:
creator- The new creator for the document.
-
getProducer
This will get the producer of the document. This will return null if no producer exists.- Returns:
- The producer of the document.
-
setProducer
This will set the producer of the document.- Parameters:
producer- The new producer for the document.
-
getCreationDate
This will get the creation date of the document. This will return null if no creation date exists.- Returns:
- The creation date of the document.
-
setCreationDate
This will set the creation date of the document.- Parameters:
date- The new creation date for the document.
-
getModificationDate
This will get the modification date of the document. This will return null if no modification date exists.- Returns:
- The modification date of the document.
-
setModificationDate
This will set the modification date of the document.- Parameters:
date- The new modification date for the document.
-
getTrapped
This will get the trapped value for the document. This will return null if one is not found.- Returns:
- The trapped value for the document.
-
getMetadataKeys
This will get the keys of all metadata getCOSObject()rmation fields for the document.- Returns:
- all metadata key strings.
- Since:
- Apache PDFBox 1.3.0
-
getCustomMetadataValue
This will get the value of a custom metadata getCOSObject()rmation field for the document. This will return null if one is not found.- Parameters:
fieldName- Name of custom metadata field from pdf document.- Returns:
- String Value of metadata field
-
setCustomMetadataValue
Set the custom metadata value.- Parameters:
fieldName- The name of the custom metadata field.fieldValue- The value to the custom metadata field.
-
removeMetadataField
-
setTrapped
This will set the trapped of the document. This will be 'True', 'False', or 'Unknown'.- Parameters:
value- The new trapped value for the document.
-