Exemplo n.º 1
0
        public FileStreamResult GetSample2c()
        {
            var          pdf    = Sample2.GetSample(Server.MapPath("../bin/gift.jpg"));
            string       s      = pdf.Output("ap.pdf", OutputDevice.ReturnAsString);
            MemoryStream m      = new MemoryStream(FPdf.PrivateEncoding.GetBytes(s));
            var          result = new FileStreamResult(m, "application/pdf");

            return(result);
        }
Exemplo n.º 2
0
        public FileStreamResult GetSample2c()
        {
            var pdf = Sample2.GetSample(null, Path.Combine(CurrentPath, "gift.jpg"));

            pdf.Buffer.BaseStream.Seek(0, SeekOrigin.Begin);
            var result = new FileStreamResult(pdf.Buffer.BaseStream, "application/pdf");

            return(result);
        }
Exemplo n.º 3
0
        public FileStreamResult GetSample2b()
        {
            var buffer = Sample2.GetSample(null, Path.Combine(CurrentPath, "3d_down.png"));

            buffer.Seek(0, SeekOrigin.Begin);
            var result = new FileStreamResult(buffer, "application/pdf");

            return(result);
        }
Exemplo n.º 4
0
        public void DoSample2()
        {
            {
                var pdf = Sample2.GetSample("logo.png");
                pdf.Output("sample2.a.pdf", OutputDevice.SaveToFile);
            }
            {
//                var pdf = Sample2.GetSample("gift.jpg");
//              pdf.Output("sample2.b.pdf", OutputDevice.SaveToFile);
            }
        }
Exemplo n.º 5
0
 public void DoSample2png()
 {
     Sample2.GetSample("sample2png.pdf", imagefile: "v3v.png");
 }
Exemplo n.º 6
0
 public void DoSample2jpg()
 {
     Sample2.GetSample("sample2jpg.pdf", imagefile: "v3v.jpg");
 }
Exemplo n.º 7
0
 public void DoSample2b()
 {
     Sample2.GetSample("sample2b.pdf", imagefile: "3d_down.png");
 }
Exemplo n.º 8
0
 public void DoSample2()
 {
     Sample2.GetSample("sample2.pdf", imagefile: "logo.png");
 }