From eb48009f5ce6351ad332b1222c397a4c37f1f385 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 8 Mar 2023 19:07:07 +0000 Subject: [PATCH] B2023-022, B2023-023 PROMS was prematurely deleting a temporary pdf file. The file will be deleted once the entire procedure is finished printing --- PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index f449486d..fab71599 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -898,11 +898,14 @@ namespace VEPROMS.CSLA.Library fs.Read(buf, 0, buf.Length); fs.Close(); - try - { - pdfFile.Delete(); - } - catch { } + // B2023-022 & B2023-023 commented out the deletion of the temporary Word section PDF file + // These files are deleted when the procedure pdf file is closed after being generated. + // PROMS was crashing because it could not find these temporary files to delete. + //try + //{ + // pdfFile.Delete(); + //} + //catch { } using (Document doc = docInfo.Get()) {