Reputation: 2433
Is it possible not to show Open/Save dialog? I would like to save the pdf file straight to specific disk location on client PC.
Upvotes: 0
Views: 853
Reputation: 1215
Yes, you can write the file directly to disk without the use of a save dialog. All you need is a directory path to write too.
string path = "C:\YourDirectoryPathHere";
System.IO.File.WriteAllBytes(Path.Combine(path, "NameYourFile.pdf"), myPDF);
This assumes myPDF is a byte[]
.
Upvotes: 1