// ---------------------------------------------------------------------------
    public void Write(Stream stream) {
      FormServlet x = new FormServlet();
      x.WebContext = HttpContext.Current;
      if (x.WebContext != null) {
        Subscribe s = new Subscribe();
        byte[] pdf = s.CreatePdf();
        x.WebContext.Response.ContentType = "application/pdf";
        if (Utility.IsHttpPost()) {
          x.DoPost(pdf, stream);
        } else {
          x.DoGet(pdf, stream);
        }
      }
      else {
        x.SendCommandLine(stream);
      }
    }
// ---------------------------------------------------------------------------
        public void Write(Stream stream)
        {
            FormServlet x = new FormServlet();

            x.WebContext = HttpContext.Current;
            if (x.WebContext != null)
            {
                Subscribe s   = new Subscribe();
                byte[]    pdf = s.CreatePdf();
                x.WebContext.Response.ContentType = "application/pdf";
                if (Utility.IsHttpPost())
                {
                    x.DoPost(pdf, stream);
                }
                else
                {
                    x.DoGet(pdf, stream);
                }
            }
            else
            {
                x.SendCommandLine(stream);
            }
        }