Interface IPLVisitor


  • public interface IPLVisitor
    Visitor callback
    Author:
    Philip Helger
    • Method Detail

      • onPageSetStart

        default void onPageSetStart​(@Nonnull
                                    PLPageSet aPageSet)
                             throws IOException
        Call on page set start
        Parameters:
        aPageSet - The current page set. Never null.
        Throws:
        IOException - on PDFBox error
      • onElement

        @Nonnull
        default com.helger.commons.state.EChange onElement​(@Nonnull
                                                           IPLRenderableObject<?> aElement)
                                                    throws IOException
        Call for each element in the current page set. This method is also called for page set header and footer elements.
        Parameters:
        aElement - The current element. Never null.
        Returns:
        EChange.CHANGED if the object was modified.
        Throws:
        IOException - on PDFBox error
      • onPageSetEnd

        default void onPageSetEnd​(@Nonnull
                                  PLPageSet aPageSet)
                           throws IOException
        Call on page set end
        Parameters:
        aPageSet - The current page set.
        Throws:
        IOException - on PDFBox error
      • createElementVisitor

        @Nonnull
        static IPLVisitor createElementVisitor​(@Nonnull
                                               com.helger.commons.functional.IThrowingFunction<? super IPLRenderableObject<?>,​com.helger.commons.state.EChange,​IOException> aElementConsumer)
        Special visitor method that visits only elements of this objects and ignores the others objects.
        Parameters:
        aElementConsumer - The consumer to use. May not be null.
        Returns:
        The new element visitor to use