private void writeHeader(@NonNls Writer writer, @Nullable String title) throws IOException {
    writer.write("<html>\n");
    writer.write("<head>\n");
    writer.write("<title>" + title + "</title>\n");
    writer.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n");
    ensureStyles();
    htmlStyleManager.writeStyleTag(writer, myPrintLineNumbers);
    writer.write("</head>\n");
    EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
    writer.write("<body bgcolor=\"" + ColorUtil.toHtmlColor(scheme.getDefaultBackground()) + "\">\n");
    writer.write("<table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH=\"100%\" BGCOLOR=\"#" + ColorUtil.toHex(new JBColor(Gray.xC0, Gray.x60)) + "\" >\n");
    writer.write("<tr><td><center>\n");
    writer.write("<font face=\"Arial, Helvetica\" color=\"#000000\">\n");
    writer.write(title + "</font>\n");
    writer.write("</center></td></tr></table>\n");
  }
private void writeHeader(@NonNls Writer writer, @Nullable String title)