Class PdfPageSplitterConfig

All Implemented Interfaces:
Labelable

public class PdfPageSplitterConfig extends BaseDocumentSplitterConfig

Split PDFs pages so each pages are treated as individual documents. May not work on all PDFs (e.g., encrypted PDFs).

The original PDF is kept intact. If you want to eliminate it to keep only the split pages, make sure to filter it. You can do so by filtering out PDFs without one of these two fields added to each pages: document.pdf.pageNumber or document.pdf.numberOfPages. A filtering example:

By default this splitter restricts its use to document.contentType matching application/pdf.

Should be used as a pre-parse handler.

See Also:
  • Constructor Details

    • PdfPageSplitterConfig

      public PdfPageSplitterConfig()
  • Method Details

    • setContentTypeMatcher

      public PdfPageSplitterConfig setContentTypeMatcher(TextMatcher contentTypeMatcher)
      The matcher of content types to apply splitting on. No attempt to split documents of any other content types will be made. Default is application/pdf.
      Parameters:
      contentTypeMatcher - content type matcher
      Returns:
      this
    • getReferencePagePrefix

      public String getReferencePagePrefix()
    • getContentTypeMatcher

      public TextMatcher getContentTypeMatcher()
      The matcher of content types to apply splitting on. No attempt to split documents of any other content types will be made. Default is application/pdf.
      Returns:
      content type matcher
    • setReferencePagePrefix

      public PdfPageSplitterConfig setReferencePagePrefix(String referencePagePrefix)
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseDocumentSplitterConfig
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class BaseDocumentSplitterConfig
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseDocumentSplitterConfig
    • toString

      public String toString()
      Overrides:
      toString in class BaseDocumentSplitterConfig