Esempio 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);
        }
Esempio 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);
        }
        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);
        }
Esempio 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);
            }
        }
Esempio n. 5
0
 public void DoSample2png()
 {
     Sample2.GetSample("sample2png.pdf", imagefile: "v3v.png");
 }
Esempio n. 6
0
 public void DoSample2jpg()
 {
     Sample2.GetSample("sample2jpg.pdf", imagefile: "v3v.jpg");
 }
Esempio n. 7
0
 public void DoSample2b()
 {
     Sample2.GetSample("sample2b.pdf", imagefile: "3d_down.png");
 }
Esempio n. 8
0
 public void DoSample2()
 {
     Sample2.GetSample("sample2.pdf", imagefile: "logo.png");
 }