Interface PDFDocument
-
- All Known Implementing Classes:
PDFDocumentImpl
public interface PDFDocumentCurrent interface provide necessary behavior of pdf document forMetadataFixerImpl- Author:
- Evgeniy Muravitskiy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InfoDictionarygetInfoDictionary()Return pdf document information dictionary representation.MetadatagetMetadata()Return pdf document metadata representation.booleanisNeedToBeUpdated()intremoveFiltersForAllMetadataObjects()Removes filters for all metadata streams in documentMetadataFixerResultsaveDocumentIncremental(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. InMetadataFixerResultImplmust set 1 of 3 states:-
MetadataFixerResult.RepairStatus.FIX_ERRORif got problems with document save -
MetadataFixerResult.RepairStatus.NO_ACTIONif metadata and information dictionary was not changed -
MetadataFixerResult.RepairStatus.SUCCESSif document save successful
- Parameters:
report- result ofMetadataFixerImplhandlingoutput- output stream for document save- Returns:
-
-
removeFiltersForAllMetadataObjects
int removeFiltersForAllMetadataObjects()
Removes filters for all metadata streams in document- Returns:
- number of unfiltered streams
-
-