From e548e1da6395b4a26ce0cbdf7b848506eca26409 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Thu, 9 May 2024 16:47:52 -0400 Subject: [PATCH] B2024-031Fix for Transitions hyperlinks in PDFs --- PROMS/Volian.Print.Library/PromsPrinter.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 82f950c3..4d61ef03 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -701,7 +701,7 @@ namespace Volian.Print.Library { if (File.Exists(outputFileName)) { - if (!BaselineTesting) + if (!BaselineTesting && !SaveLinks) // B2024-031 don't do if creating PDF hyperlinks { String tmpExt = System.IO.Path.GetExtension(outputFileName); String tmpPTH = System.IO.Path.GetDirectoryName(outputFileName); @@ -719,6 +719,10 @@ namespace Volian.Print.Library outputFileName = filename; } + // B2024-031 if doing PDF hyperlinks (Create RO and Transition Hyperlinks) then try to + // delete the old PDF file before creating the new one + if (SaveLinks) + File.Delete(outputFileName); } writer = PdfWriter.GetInstance(document, new FileStream(outputFileName, FileMode.Create)); -- 2.47.2