Class OfficeStampers

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

public class OfficeStampers extends Object

OfficeStampers is a utility class that provides factory methods for creating document stampers for Office documents. This class offers convenient methods to create stampers for DOCX documents with various configurations.

The stampers created by this utility can apply various preprocessing steps to enhance the document processing capabilities.

  • Method Details

    • docxStamper

      public static StreamStamper<org.docx4j.openpackaging.packages.WordprocessingMLPackage> docxStamper()
      Creates a new instance of a StreamStamper for handling WordprocessingMLPackage documents with a default full configuration.
      Returns:
      a StreamStamper instance for stamping WordprocessingMLPackage documents
      See Also:
    • docxStamper

      public static StreamStamper<org.docx4j.openpackaging.packages.WordprocessingMLPackage> docxStamper(OfficeStamperConfiguration configuration)

      Creates a StreamStamper instance that processes WordprocessingMLPackage (DOCX) documents by applying stamping with the given configuration.

      The returned stamper is designed to handle the transformation of DOCX templates using provided context data.

      Parameters:
      configuration - an instance of OfficeStamperConfiguration that defines the behavior and preprocessing steps of the stamper
      Returns:
      a StreamStamper of WordprocessingMLPackage configured to process DOCX documents
    • docxPackageStamper

      public static OfficeStamper<org.docx4j.openpackaging.packages.WordprocessingMLPackage> docxPackageStamper(OfficeStamperConfiguration configuration)
      Creates an OfficeStamper instance for processing WordprocessingMLPackage documents with the specified configuration.
      Parameters:
      configuration - an instance of OfficeStamperConfiguration that defines the behavior of the stamper
      Returns:
      an OfficeStamper for WordprocessingMLPackage configured to process DOCX documents