c# save pdf to folder
protected void save_pdf()
{
String path_name = "~/PDF/";
var pdfPath = Path.Combine(Server.MapPath(path_name));
var formFieldMap = PDFHelper.GetFormFieldNames(pdfPath);
string username = "Test";
string password = "12345";
String file_name_pdf = "Test.pdf";
var pdfContents = PDFHelper.GeneratePDF(pdfPath, formFieldMap);
File.WriteAllBytes(Path.Combine(pdfPath, file_name_pdf), pdfContents);
WebRequest request = WebRequest.Create(Server.MapPath("~/PDF/" + pdfContents));
request.Method = WebRequestMethods.Ftp.UploadFile;
request.Credentials = new NetworkCredential(username, password);
Stream reqStream = request.GetRequestStream();
reqStream.Close();
}
Also in C#:
- how to redirect to extern page in .net core
- vb.net check if datatable has rows
- Instantiate c#
- c sharp list length
- start up file in asp.net core
- datatable return column names
- unity accessing 2d pointlight from c# script
- how to reference the position of a game object unity
- random from list c#
- how to close a form c#
- how does Pow work C#
- setting the parent of a transform which resides in a prefab
- how to disable a gameObject unity c#
- how to select time and date in datetimepicker in c#
- c# get list of all class fields
- get attribute value of xml element c#
- get string character by index c#
- condition when a animation finishes in unity
- viewBag as a list
- print content of array c#
- get out of foreach statement c#
- c# tab character
- null coalesce ternary c#
- string isnullorempty vs isnullorwhitespace