Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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"));
but no use.
Posted
Updated 17-Jan-17 20:47pm
Comments
Richard Deeming 17-Jan-17 10:27am    
Based on 30 seconds reading the API samples, I suggest you try:
doc.Save(Server.MapPath("~/" + "Sample" + ".pdf"));
sencsk 25-Jan-17 0:20am    
hey thanks

1 solution

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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900