diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 3d81564f..39ba5d75 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -496,18 +496,21 @@ namespace Volian.Print.Library if (VEPromsFile.Exists && !doingFoldout) { _MyHelper.BackgroundFile = procedureFileName; - // 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: float x = 0; float y = 0; if (!(mySection.ActiveFormat.Name.ToUpper().StartsWith("WST") || _MyHelper.Back32BitPROMS)) // compare folder contains PROMS generated PDF { + // X value below = 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: + // These values adjust if overlay is 16bit versus 32bit. This is + // used so that the comparison is an exact match. Use 0,0 if comparing to another 32bit + // pdf, i.e. won't process the following 2 lines of code. x = 2 * 72F / (float)myProcedure.ActiveFormat.PlantFormat.FormatData.Font.CPI; y = -9.5F; } - x += 72F * VlnSettings.GetCommandFloat("X", x); - y -= 72F * VlnSettings.GetCommandFloat("Y", y); + x += 72F * VlnSettings.GetCommandFloat("X", 0); + y -= 72F * VlnSettings.GetCommandFloat("Y", 0); _MyHelper.BackgroundOffset = new PointF(x,y); _MyHelper.BackgroundPageOffset = 0; }