i want to get the path of a file from _layouts folder in sharepoint 2013, for a stream input.
i tried:
1-
iTextSharp.text.Document doc = new iTextSharp.text.Document(PageSize.A4);
var path = Server.MapPath(@"\15\TEMPLATE\LAYOUTS\wfcourrierdep\images
\LettreI.png");
var output = new FileStream(path, FileMode.Create);
var writer = PdfWriter.GetInstance(doc, output);
doc.Open();
i got an error
2-
iTextSharp.text.Document doc = new iTextSharp.text.Document(PageSize.A4);
var path = SPUtility.GetCurrentGenericSetupPath(@"TEMPLATE\LAYOUTS
\wfcourrierdep\pdf\Dictionnaire.pdf");
var output = new FileStream(path, FileMode.Create);
var writer = PdfWriter.GetInstance(doc, output);
doc.Open();
i got an error
i want to use the GetCurrentGenericSetupPath or GetVersionedGenericSetupPath but i don't know what is the format of my url i should pass in.
thanks a lot for your helps
Aucun commentaire:
Enregistrer un commentaire