diff --git a/src/WorkFlowCheck.API/Pdf/CheckList_Template_V1.docx b/src/WorkFlowCheck.API/Pdf/CheckList_Template_V1.docx index f938ca2..a7ac26c 100644 Binary files a/src/WorkFlowCheck.API/Pdf/CheckList_Template_V1.docx and b/src/WorkFlowCheck.API/Pdf/CheckList_Template_V1.docx differ diff --git a/src/WorkFlowCheck.BL/DocumentGenerator/DokumentumGenerator.cs b/src/WorkFlowCheck.BL/DocumentGenerator/DokumentumGenerator.cs index 4e96ef5..c3282be 100644 --- a/src/WorkFlowCheck.BL/DocumentGenerator/DokumentumGenerator.cs +++ b/src/WorkFlowCheck.BL/DocumentGenerator/DokumentumGenerator.cs @@ -41,7 +41,11 @@ namespace WorkFlowCheck.BL.DocumentGenerator // LibreOffice parancssori konverzió ProcessStartInfo startInfo = new ProcessStartInfo { +#if !DEBUG FileName = "e:\\LibreOffice\\program\\soffice", // LibreOffice parancs +#else + FileName = "c:\\Program Files\\LibreOffice\\program\\soffice", // LibreOffice parancs +#endif Arguments = $"--headless --convert-to pdf \"{tempWordPath}\" --outdir \"{pdfDirectory}", RedirectStandardOutput = true, UseShellExecute = false, @@ -169,8 +173,6 @@ namespace WorkFlowCheck.BL.DocumentGenerator body.Append(new Paragraph(new Run(new Break() { Type = BreakValues.Page }))); body.Append(table); } - - private static Drawing CreateImageDrawing(string relationshipId, long width, long height) { return new Drawing( diff --git a/src/WorkFlowCheck.BL/Services/CheckListService.cs b/src/WorkFlowCheck.BL/Services/CheckListService.cs index e26e1f2..cecad2d 100644 --- a/src/WorkFlowCheck.BL/Services/CheckListService.cs +++ b/src/WorkFlowCheck.BL/Services/CheckListService.cs @@ -313,13 +313,14 @@ namespace WorkFlowCheck.BL.Services byte[] byteArray = File.ReadAllBytes(Path.Combine(pdfDirectory, "CheckList_Template_V1.docx")); SablonGenerator gen = new SablonGenerator(byteArray); + gen.SimpleReplace("#description#", checkListHeader.Description); gen.SimpleReplace("#DocumentNumber#", checkListHeader.DocumentNumber); gen.SimpleReplace("#DateExecution#", checkListHeader.DateExecution.ToString("yyyy.MM.dd HH:mm")); gen.SimpleReplace("#WorkUser#", $"{checkListHeader.UserDTO?.LastName} {checkListHeader.UserDTO?.FirstName}"); gen.SimpleReplace("#AcceptUser#", $"{checkListHeader.AcceptUserDTO?.LastName} {checkListHeader.AcceptUserDTO?.FirstName}"); gen.SimpleReplace("#Guid#", checkListHeader.GuidNumber.ToString()); - gen.SimpleReplace("#description#", checkListHeader.Description); + if (checkListHeader.CheckListRowDTO != null && checkListHeader.CheckListRowDTO.Count > 0) { var elements = new List>();