Пример #1
0
// ---------------------------------------------------------------------------
    public void Write(Stream stream) {
      FDFServlet x = new FDFServlet();
      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);
      }
    }
Пример #2
0
// ---------------------------------------------------------------------------
        public void Write(Stream stream)
        {
            FDFServlet x = new FDFServlet();

            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);
            }
        }