public static string GetPdfFile(string ftpPath, string staPDFPath)//(p.ReportPath, pdf文件路径+名字)(http://127.0.0.1/Report/1005320191016191013.PDF,debug/temp/报告id+时间.pdf)
{
//需要下载的文件名
string FileName = string.Empty;
try
{
Uri uri = new Uri(ftpPath);//http://127.0.0.1/Report/1005320191016191013.PDF
//下载后存放的路径
FileName = staPDFPath;//debug/temp/报告id+时间.pdf
//创建文件流
FileStream fs = null;
Stream responseStream = null;
&n
Http下载pdf报告
最新推荐文章于 2024-09-20 09:41:26 发布

本文详细介绍了如何通过HTTP协议从Web服务器下载PDF报告,涵盖了请求设置、错误处理和文件保存等关键步骤,帮助读者理解并实现高效稳定的PDF文件下载过程。
最低0.47元/天 解锁文章
1664

被折叠的 条评论
为什么被折叠?



