diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 0181a167..a90d1515 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -259,6 +259,7 @@ namespace Volian.Print.Library { OnStatusChanged("Print " + myProcedure.DisplayNumber, PromsPrinterStatusType.Start); string outputFileName = pdfFolder + "\\" + PDFFile; + if (!OverWrite && File.Exists(outputFileName)) { if (MessageBox.Show(outputFileName + " exists. Overwrite file?", "File Exists", MessageBoxButtons.YesNo) == DialogResult.No) @@ -292,10 +293,10 @@ namespace Volian.Print.Library if (VEPromsFile.Exists) { _MyHelper.BackgroundFile = procedureFileName; - //if (Environment.UserName.ToUpper() == "KATHY") - // _MyHelper.BackgroundOffset = new PointF(12, -13.5F); // non-KBR Needs this to be -9.5 to line up! - //else - _MyHelper.BackgroundOffset = new PointF(12, -9.5F); // KBR Needs this to be -13.5 to line up! + // X argument below: accounts for 16-bit pdf OverrideLeftMargin = -2 characters at the plant format's default Font's + // characters per inch. + // 16bit OverrideLeftMargin, defined as -2 in driver\drvin.rtf, - override took 2 characters out, so we're adding it back in: + _MyHelper.BackgroundOffset = new PointF(2*72F/(float)myProcedure.ActiveFormat.PlantFormat.FormatData.Font.CPI, -9.5F); _MyHelper.BackgroundPageOffset = 0; } _MyHelper.WatermarkLayer = _WatermarkLayer; @@ -404,7 +405,7 @@ namespace Volian.Print.Library float yBottomMargin = yTopMargin - (float)myItemInfo.MyDocStyle.Layout.PageLength - 2 * vlnPrintObject.SixLinesPerInch; vlnParagraph.Prefix = myItemInfo.Path; Rtf2Pdf.PdfDebug = true; - Rtf2Pdf.Offset = new PointF(24, 2.5F); + Rtf2Pdf.Offset = new PointF(0, 2.5F); _MyHelper.ChangeBarDefinition = MyChangeBarDefinition; vlnParagraph myParagraph = new vlnParagraph(null, cb, myItemInfo, (float)myItemInfo.MyDocStyle.Layout.LeftMargin, 0, 0, myItemInfo.ColumnMode, myItemInfo.ActiveFormat); if (myItemInfo.HasChildren)