I am wrting a c# code which is perfectly running in my local developemt server, when i deploying the same application in windows Server 2016 the libreOffice not create pdf file from word doc. I am pasting my code for reference.
string fileName = Path.GetFileName(wordFilePath);
string fileDir = Path.GetDirectoryName(outputPdfPath);
string str = "This is the \"String\" class.";
string outputDir = "\"E:\\Temp Cover Note\\Templates\"";
var pdfProcess = new Process();
pdfProcess.StartInfo.FileName = @"C:\Program Files (x86)\LibreOffice\program\soffice.com";
log.Info("\"C:\\Program Files (x86)\\LibreOffice\\program\\soffice.com\" --headless --convert-to pdf \"E:\\Temp Cover Note\\Templates\\" + CoverNotId + ".docx\" --outdir "+ outputDir);
pdfProcess.StartInfo.Arguments = "\"C:\\Program Files (x86)\\LibreOffice\\program\\soffice.com\" --headless --convert-to pdf \"E:\\Temp Cover Note\\Templates\\" + CoverNotId + ".docx\" --outdir " + outputDir;
//String.Format("--norestore --nofirststartwizard --headless --convert-to pdf \"{0}\"", fileName);
pdfProcess.StartInfo.WorkingDirectory = fileDir;
pdfProcess.StartInfo.RedirectStandardOutput = true;
pdfProcess.StartInfo.RedirectStandardError = true;
pdfProcess.StartInfo.UseShellExecute = false;
pdfProcess.Start();
string output = pdfProcess.StandardOutput.ReadToEnd();
string error = pdfProcess.StandardError.ReadToEnd();