pdf文件导出并保存到文件夹中 [英] pdf file export and save into a folder

查看:148
本文介绍了pdf文件导出并保存到文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Asp.net C#webapplication。我在我的页面中导出pdf文件,当我点击exportdata然后导出一个pdf文件但它会自动保存在我的系统的Downloads文件夹中,但我想将pdf保存到一个我的Application.Is中的文件夹可以通过编码或其他方式。 Plz帮助...



谢谢....

解决方案

嗨Bhati,



可能是以下链接将指导您如何做到这一点...

save-generated-pdf-in-the-database-using-c-sharp ]



此链接

将PDF文档保存到您的文件夹中项目在c# [ ^ ]

我找到了解决方案



 iTextSharp.text.Document oDoc =  new  iTextSharp.text.Document(); 
PdfWriter.GetInstance(oDoc, new FileStream( HelloWorld.pdf,FileMode.Create));
oDoc.Open();
oDoc.Add( new 段落( Hello World!));
oDoc.Close();


检查这个使用iTextSharp和C#将图表控件导出到ASP.NET中的PDF文档

I have a Asp.net C# webapplication .I Export pdf file in my page,and when i click exportdata then a pdf file is exported but it automatically save in Downloads folder of my systen but I want to Save following pdf into a folder which is inside my Application.Is it possible through coding or some other way. Plz Help...

Thanks....

解决方案

Hi Bhati,

may be following link will guide you how you can do that ...
saving-generated-pdf-in-the-database-using-c-sharp]

this link
Save a PDF Document into a Folder inside your project in c#[^]


I found the solution

iTextSharp.text.Document oDoc = new iTextSharp.text.Document();
PdfWriter.GetInstance(oDoc, new FileStream("HelloWorld.pdf", FileMode.Create));
oDoc.Open();
oDoc.Add(new Paragraph("Hello World!"));
oDoc.Close();


Check this Export Chart control to PDF document in ASP.NET using iTextSharp and C#


这篇关于pdf文件导出并保存到文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆