Interface PDFDocument
-
- All Known Implementing Classes:
PDFDocumentImpl
public interface PDFDocument
Current interface provide necessary behavior of pdf document forMetadataFixerImpl
- Author:
- Evgeniy Muravitskiy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InfoDictionary
getInfoDictionary()
Return pdf document information dictionary representation.Metadata
getMetadata()
Return pdf document metadata representation.boolean
isNeedToBeUpdated()
int
removeFiltersForAllMetadataObjects()
Removes filters for all metadata streams in documentMetadataFixerResult
saveDocumentIncremental(MetadataFixerResult.RepairStatus status, OutputStream output)
Incremental save of pdf document.
-
-
-
Method Detail
-
getMetadata
Metadata getMetadata()
Return pdf document metadata representation. Must return null if and only if handler having problems with metadata obtain (exceptions, for example). If metadata is not present in the document ('Metadata' key in catalog not present or empty) it`s must be added.- Returns:
- metadata representation or null
- See Also:
Metadata
-
getInfoDictionary
InfoDictionary getInfoDictionary()
Return pdf document information dictionary representation. Must be not null (empty, for example).- Returns:
- information dictionary representation
- See Also:
InfoDictionary
-
isNeedToBeUpdated
boolean isNeedToBeUpdated()
- Returns:
-
saveDocumentIncremental
MetadataFixerResult saveDocumentIncremental(MetadataFixerResult.RepairStatus status, OutputStream output)
Incremental save of pdf document. Document must be saved if and only if metadata or information dictionary of document was changed. InMetadataFixerResultImpl
must set 1 of 3 states:-
MetadataFixerResult.RepairStatus.FIX_ERROR
if got problems with document save -
MetadataFixerResult.RepairStatus.NO_ACTION
if metadata and information dictionary was not changed -
MetadataFixerResult.RepairStatus.SUCCESS
if document save successful
- Parameters:
report
- result ofMetadataFixerImpl
handlingoutput
- output stream for document save- Returns:
-
-
removeFiltersForAllMetadataObjects
int removeFiltersForAllMetadataObjects()
Removes filters for all metadata streams in document- Returns:
- number of unfiltered streams
-
-