A PDF generálásának javítása
This commit is contained in:
Binary file not shown.
@@ -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(
|
||||
|
||||
@@ -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<List<string>>();
|
||||
|
||||
Reference in New Issue
Block a user