创建PDF保存到服务器路径位置 [英] Created PDF save to server path location

查看:110
本文介绍了创建PDF保存到服务器路径位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,



在我的项目中,我提供了使用免费HTML转PDF转换ASP NET MVC | HTML到PDF在线| PDF SDK [ ^ ]



现在我能够创建PDF作为我的期望,即使我可以下载但现在我的问题是我需要将pdf文件位置保存到我的服务器中我不知道怎么可能。我可以使用以下代码创建PDF并将其下载到客户机默认位置。如何推送和保存位置作为我的服务器位置。



Hi Team,

In my project i give the option to generate the current web page as pdf by using Free HTML to PDF Converter ASP NET MVC | HTML to PDF Online | PDF SDK[^]

now i can able to create PDF as my expectation even i can download but now my problem is i need to save the pdf file location into my server i don't know how is it possible. i can create PDF and download it to client machine default location with below code. how to push and save location as my server location.

// save pdf document
doc.Save(Response, false, "Sample.pdf");





任何人都可以帮我实现目标



我尝试过:


上面代码中的
,我将文件名更改为



can any one help me to achieve my goal

What I have tried:

in above code , i change the file name as

doc.Save(Response, false, Server.MapPath("~/" + "Sample" + ".pdf"));

但没有用。

推荐答案

你好,

你能说什么时候更新吗? doc.save()它在哪里保存在哪个位置?



如果文件保存在应用程序文件夹结构的某处,你将很容易移动该文件使用文件IO操作



谢谢,

Regard
Hello ,
Can you just update when do you say doc.save() where does it get saved on which location ?

If the file is saved on the somewhere is application folder structure you will be easily be able to move that file using File IO operations

Thanks,
Regard


这篇关于创建PDF保存到服务器路径位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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