@Override
  public void visit(ParaNode node) {
    boolean printParagraphTag = true;

    List<Node> childNodes = node.getChildren();

    for (Node childNode : childNodes) {
      List<Node> grandchildNodes = childNode.getChildren();

      for (Node grandchildNode : grandchildNodes) {
        if (grandchildNode instanceof TextNode) {
          TextNode textNode = (TextNode) grandchildNode;

          String text = textNode.getText();

          if (text.equals("+$$$") || text.equals("$$$")) {
            visitChildren(node);

            printParagraphTag = false;
          }
        }
      }
    }

    if (printParagraphTag) {
      printTag(node, "p");
    }
  }
 public List<Element> collectChildren(int level, Node node) {
   Collector<Element> collector = new Collector<Element>();
   iTextContext().pushElementConsumer(collector);
   for (Node child : node.getChildren()) {
     process(level + 1, child);
   }
   iTextContext().popElementConsumer();
   return collector.getCollected();
 }
  public PicWithCaptionNode(String src, Node node) {
    super(node);

    _src = src;

    List<Node> nodes = node.getChildren();

    if ((nodes != null) && !nodes.isEmpty() && (nodes.get(0) instanceof TextNode)) {

      TextNode textNode = (TextNode) nodes.get(0);

      _alt = textNode.getText();
    } else {
      _alt = _BLANK;
    }
  }
 public void processChildren(int level, Node node) {
   for (Node child : node.getChildren()) {
     process(level + 1, child);
   }
 }