code: public static PdfLayer createTitle(String title, PdfWriter writer) {
          if (title == null)
              throw new NullPointerException("Title cannot be null.");
          PdfLayer layer = new PdfLayer(title);
          writer.registerLayer(layer);
          return layer;
      }
docs: Creates a title layer. A title layer is not really a layer but a collection of layers
  under the same title heading.
  @param title the title text
  @param writer the <CODE>PdfWriter</CODE>
  @return the title layer