public void setAppearanceStream() {
    // copy over annotation properties from the free text annotation.
    if (fontFile == null || freeTextAnnotation.isFontPropertyChanged()) {
      fontFile =
          FontManager.getInstance()
              .getType1AWTFont(freeTextAnnotation.getFontName(), freeTextAnnotation.getFontSize());
    }
    freeTextPane.setFont(fontFile);
    freeTextPane.setForeground(freeTextAnnotation.getFontColor());

    if (freeTextAnnotation.isFillType()) {
      freeTextPane.setOpaque(true);
      freeTextPane.setBackground(freeTextAnnotation.getFillColor());
    } else {
      freeTextPane.setOpaque(false);
    }
    if (freeTextAnnotation.isStrokeType()) {
      if (freeTextAnnotation.getBorderStyle().isStyleSolid()) {
        freeTextPane.setBorder(
            BorderFactory.createLineBorder(
                freeTextAnnotation.getColor(),
                (int) freeTextAnnotation.getBorderStyle().getStrokeWidth()));
      } else if (freeTextAnnotation.getBorderStyle().isStyleDashed()) {
        freeTextPane.setBorder(
            new DashedBorder(freeTextAnnotation.getBorderStyle(), freeTextAnnotation.getColor()));
      }
    } else {
      freeTextPane.setBorder(BorderFactory.createEmptyBorder());
    }

    String content = null;
    try {
      content = freeTextPane.getDocument().getText(0, freeTextPane.getDocument().getLength());
    } catch (BadLocationException e) {
      logger.warning("Error getting rich text.");
    }
    Rectangle tBbox = convertToPageSpace(getBounds());

    // generate the shapes
    freeTextAnnotation.setBBox(tBbox);
    freeTextAnnotation.setContents(content);
    freeTextAnnotation.setRichText(freeTextPane.getText());
    freeTextPane.revalidate();
  }