Interface PDFDocument

All Known Implementing Classes:
PDFDocumentImpl

public interface PDFDocument
Current interface provide necessary behavior of pdf document for MetadataFixerImpl
Author:
Evgeniy Muravitskiy
  • Method Details

    • 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:
    • getInfoDictionary

      InfoDictionary getInfoDictionary()
      Return pdf document information dictionary representation. Must be not null (empty, for example).
      Returns:
      information dictionary representation
      See Also:
    • isNeedToBeUpdated

      boolean isNeedToBeUpdated()
      Returns:
    • saveDocumentIncremental

      MetadataFixerResult saveDocumentIncremental(MetadataFixerResult.RepairStatus status, OutputStream output, PDFAFlavour flavour)
      Incremental save of pdf document. Document must be saved if and only if metadata or information dictionary of document was changed. In MetadataFixerResultImpl must set 1 of 3 states:
      Parameters:
      report - result of MetadataFixerImpl handling
      output - output stream for document save
      Returns:
    • removeFiltersForAllMetadataObjects

      int removeFiltersForAllMetadataObjects()
      Removes filters for all metadata streams in document
      Returns:
      number of unfiltered streams