code: protected void pushPrinter(WikiPrinter wikiPrinter)
      {
          this.printers.push(wikiPrinter);
  
          // Since we're setting a new printer to use, make sure that all print renderers in the chain have the new
          // printer set. Only do this if we're on the top level Print Renderer.
          if (getListenerChain().indexOf(getClass()) == 0) {
              ChainingListener nextListener = this;
              while ((nextListener = getListenerChain().getNextListener(nextListener.getClass())) != null) {
                  if (PrintRenderer.class.isAssignableFrom(nextListener.getClass())) {
                      ((PrintRenderer) nextListener).setPrinter(wikiPrinter);
                  }
              }
          }
      }
docs: Change the current {@link WikiPrinter} with the provided one.
  
  @param wikiPrinter the new {@link WikiPrinter} to use