Class Postprocessors

java.lang.Object
pro.verron.officestamper.preset.Postprocessors

public class Postprocessors extends Object

The Postprocessors class provides static utility methods for obtaining implementations of the PostProcessor interface that perform specific post-processing operations on WordprocessingMLPackage documents.

This class is a utility class and cannot be instantiated.

  • Method Details

    • removeOrphanedFootnotes

      public static PostProcessor removeOrphanedFootnotes()
      Creates a PostProcessor that removes orphaned footnotes from a WordprocessingMLPackage document. An orphaned footnote is a footnote that is defined in the document but does not have a corresponding reference in the main content. This PostProcessor ensures that such unused footnotes are cleaned up, maintaining the structural integrity of the document.
      Returns:
      a PostProcessor instance that performs the removal of orphaned footnotes
    • removeOrphanedEndnotes

      public static PostProcessor removeOrphanedEndnotes()
      Creates a PostProcessor that removes orphaned endnotes from a WordprocessingMLPackage document. An orphaned endnote is an endnote that is defined in the document but does not have a corresponding reference in the main content. This PostProcessor ensures that such unused endnotes are cleaned up, maintaining the integrity and consistency of the document.
      Returns:
      a PostProcessor instance that performs the removal of orphaned endnotes
    • removeTags

      public static PostProcessor removeTags(String element)
      Creates a PostProcessor that removes specified XML elements from a WordprocessingMLPackage document. This PostProcessor searches for and removes all occurrences of the specified element tag within the document, helping to clean up temporary or unwanted markup that may have been used during the stamping process.
      Parameters:
      element - the name of the XML element to be removed from the document
      Returns:
      a PostProcessor instance that performs the removal of specified tags