采用ASP.net将BMP档案转换成一个一页的PDF的最容易的方法是什么? I m将产生8.5”×11“BMP”闪电(这意味着我可以操纵它,使其尽可能方便),然后使用POST将其上载到ASP网页上,该网页将转换为PDF,并将用户转至PDF。 我不想增加任何幅度或其它任何东西,而是将适当列入《巴厘岛行动计划》。
在闪电中将其转换成国防军,然后上载,是否容易?
感谢!
采用ASP.net将BMP档案转换成一个一页的PDF的最容易的方法是什么? I m将产生8.5”×11“BMP”闪电(这意味着我可以操纵它,使其尽可能方便),然后使用POST将其上载到ASP网页上,该网页将转换为PDF,并将用户转至PDF。 我不想增加任何幅度或其它任何东西,而是将适当列入《巴厘岛行动计划》。
在闪电中将其转换成国防军,然后上载,是否容易?
感谢!
您可使用iTextSharp创建PDF,并将图像插入该文件。 这一切都可以在人民国防军最终向客户生产的情况下进行。
下面是MVC方法,被 stripped光显示,但应当了解如何做到这一点。
[HttpGet]
public FileStreamResult Export(int? ID)
{
MemoryStream stream = new MemoryStream();
Document pdf = new Document();
PdfWriter writer = PdfWriter.GetInstance(pdf, stream);
pdf.Open();
PdfPTable tblImage = new PdfPTable(1);
tblImage.AddCell(Image.GetInstance(LogChart())); //The LogChart method returns image
pdf.Add(Image);
pdf.Close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Log.pdf");
Response.Buffer = true;
Response.Clear();
Response.OutputStream.Write(stream.GetBuffer(), 0, stream.GetBuffer().Length);
Response.OutputStream.Flush();
Response.End();
return new FileStreamResult(Response.OutputStream, "application/pdf");
}
In my webpages I have references to js and images as such: "../../Content/Images/"Filename" In my code if I reference a file as above, it doesnt work so i have to write: "c:/miscfiles/"filename" 1-...
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...
I m looking for best practices here. Sorry. I know it s subjective, but there are a lot of smart people here, so there ought to be some "very good" ways of doing this. I have a custom object called ...
I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...
i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...
For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!