code: public void toPdf(PdfWriter writer, OutputStream os) throws IOException {
          if (color != null && !color.equals(Color.black)) {
              put(PdfName.C, new PdfArray(new float[]{color.getRed()/255f,color.getGreen()/255f,color.getBlue()/255f}));
          }
          int flag = 0;
          if ((style & Font.BOLD) != 0)
              flag |= 2;
          if ((style & Font.ITALIC) != 0)
              flag |= 1;
          if (flag != 0)
              put(PdfName.F, new PdfNumber(flag));
          if (parent != null) {
              put(PdfName.PARENT, parent.indirectReference());
          }
          if (destination != null && destination.hasPage()) {
              put(PdfName.DEST, destination);
          }
          if (action != null)
              put(PdfName.A, action);
          if (count != 0) {
              put(PdfName.COUNT, new PdfNumber(count));
          }
          super.toPdf(writer, os);
      }
docs: Returns the PDF representation of this <CODE>PdfOutline</CODE>.
  
  @param writer the encryption information
  @param os
  @throws IOException