下载pdf文件时的问题。 [英] problem at the time of downloading a pdf file.

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

问题描述

您好



我正在创建一个pdf文件并想下载它。它在我的本地系统中正常工作。

Hello

I am creating a pdf file and want to download it. It is working correctly from my local system.

venderprint pdfForm = new venderprint(GetTable(), Server.MapPath("~/images/logopdf.png"));

            // Create a MigraDoc document
            Document document = pdfForm.CreateDocument();
            document.UseCmykColor = true;

            // Create a renderer for PDF that uses Unicode font encoding
            PdfDocumentRenderer pdfRenderer = new PdfDocumentRenderer(true);

            // Set the MigraDoc document
            pdfRenderer.Document = document;


            // Create the PDF document
            pdfRenderer.RenderDocument();

            // Save the PDF document...
            string filename = "VendorInformation.pdf"; 
            pdfRenderer.Save(Server.MapPath("~/File/"+filename));
            Process.Start(Server.MapPath("~/File/" + filename));



这是我正在使用的代码。该文件存储在文件夹中并在我的本地系统上自动打开,但是服务器文件存储在文件夹中但无法打开。


This is the code which i am using. The file is storing in File Folder and opening automatically on my local system, but is server the file is storing in File folder but it could not open.

推荐答案

最有可能这是权限问题,尝试共享该文件夹并提供写入权限
most probably it is an issue with permissions, try by sharing that folder and giving write permissions as well


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

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