用c#下载pdf文件的代码 [英] download code of pdf file with c #

查看:167
本文介绍了用c#下载pdf文件的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用c#
下载pdf文件的 Coe 代码
[已编辑]正确的拼写[/已编辑]

download Coe code of pdf file with c #

Corrected spelling[/Edited]

推荐答案

使用C#(.NET 2.0)和iTextSharp创建PDF表 [ ITextSharp帮助程序类 [使用C#2.0创建PDF文件的教程 [ http://itextpdf.com/book/examples.php [
Creating PDF Documents in ASP.NET[^]
Creating PDF Tables using C# (.NET 2.0) and iTextSharp[^]
ITextSharp Helper Class[^]
Tutorials on creating PDF files using C# 2.0[^]
and samples from iText would also help.
http://itextpdf.com/book/examples.php[^]


这是客户端部分的下载吗?简单:

Is this downloading by client part? Simple:

<a src="files/myDocument.pdf">Download document here</a>



服务器部分? FTP? HTTP?根据协议,可以使用类System.Net.FtpWebRequestSystem.Net.HttpWebRequest,请参见:
http://msdn.microsoft.com/en-us/library/system.net. webrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.net. ftpwebrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.net. httpwebrequest.aspx [ ^ ].

您也可以使用System.Net.WebClient类,该类可以与URI定义的不同协议一起使用.这是一个代码示例: http://www.csharp-examples.net/download-files/ [ ^ ].

—SA



Server part? FTP? HTTP? Depending on protocol, you can use the class System.Net.FtpWebRequest or System.Net.HttpWebRequest, see:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

You can also use the class System.Net.WebClient which can work with different protocols defined by URI. Here is a code sample: http://www.csharp-examples.net/download-files/[^].

—SA


这篇关于用c#下载pdf文件的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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