Last post Aug 19, 2015 04:24 AM by Rolla
Aug 19, 2015 02:48 AM|Rolla|LINK
I'm using iTextSharp to convert part of the page to pdf and save it in a folder.
Now I want the pdfs to be saved in a Network Folder (shared drives in the office)
This is the code I'm using and it's working fine to save in project folder:
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, new FileStream(Server.MapPath("~/PDFDocuments/employee_" + signature.Text + "_" + ID + ".pdf"), FileMode.CreateNew));
Aug 19, 2015 03:27 AM|Mikesdotnetting|LINK
Provide the full UNC path to the FileStream constructor:
var uncPath = @"\\YourServer\YourFolder\YourSubfolder\employee_"+ signature.Text + "_" + ID + ".pdf";
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, new FileStream(uncPath, FileMode.CreateNew));
Aug 19, 2015 04:24 AM|Rolla|LINK
Thank you for your useful reply. It's working fine now.