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