Added somecode so that profile errors will be recordedd to the Error Log
Added a reference to Log4Net Fixed Profile Logic when PDF cannot be created because it is already open.
This commit is contained in:
@@ -438,7 +438,11 @@ namespace Volian.Print.Library
|
||||
// Setup a pdf Document for printing
|
||||
OnStatusChanged("Before OpenDoc", PromsPrinterStatusType.Before);
|
||||
PdfContentByte cb = OpenDoc(outputFileName);
|
||||
if (cb == null) return null;
|
||||
if (cb == null)
|
||||
{
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
return null;
|
||||
}
|
||||
OnStatusChanged("Before NewPage", PromsPrinterStatusType.Before);
|
||||
cb.PdfDocument.NewPage(); // Start of print
|
||||
//_MyLog.InfoFormat("NewPage 1 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
@@ -446,6 +450,7 @@ namespace Volian.Print.Library
|
||||
if (myProcedure.Sections == null)
|
||||
{
|
||||
MessageBox.Show("This procedure has no content and will not be printed.", "Empty Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
return null;
|
||||
}
|
||||
OnStatusChanged(myProcedure.DisplayNumber, PromsPrinterStatusType.ProgressSetup, myProcedure.Sections.Count);
|
||||
|
Reference in New Issue
Block a user