Class HookRemover
java.lang.Object
pro.verron.officestamper.api.HookRemover
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionHookRemover(String element) Constructs a newHookRemoverwith the specified element name. -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.docx4j.openpackaging.packages.WordprocessingMLPackage document) Processes a given WordprocessingMLPackage document.
-
Constructor Details
-
HookRemover
Constructs a newHookRemoverwith 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:PostProcessorProcesses 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:
processin interfacePostProcessor- Parameters:
document- the WordprocessingMLPackage document to process
-