Class HookRemover

java.lang.Object
pro.verron.officestamper.api.HookRemover
All Implemented Interfaces:
PostProcessor

public final class HookRemover extends Object implements PostProcessor

A post-processor implementation that removes smart tags from a WordprocessingML document.

This processor is designed to clean up documents by removing specific smart tags (hooks) while preserving their content. It operates on the document's XML structure to find and eliminate smart tag elements.

This is particularly useful for removing the officestamper smart tags used during the stamping process to leave a clean document.

  • Constructor Details

    • HookRemover

      public HookRemover(String element)
      Constructs a new HookRemover with the specified element name.
      Parameters:
      element - the name of the element to be removed from the document
  • Method Details

    • process

      public void process(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
      Description copied from interface: PostProcessor
      Processes a given WordprocessingMLPackage document. This method is typically used for performing operations such as modifying content, cleaning up the document structure, or applying other transformations.
      Specified by:
      process in interface PostProcessor
      Parameters:
      document - the WordprocessingMLPackage document to process