C2018-004 logic to print meta file information
C2018-009 logic to print PROMS version on PDF pages
This commit is contained in:
@@ -949,7 +949,7 @@ namespace Volian.Print.Library
|
||||
float retval = yLocation;
|
||||
if (MyItemInfo.IsRtfRaw)
|
||||
{
|
||||
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin);
|
||||
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin, MyItemInfo.ItemID); // C2018-004 ItemID for create meta file for baseline compares
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1073,7 @@ namespace Volian.Print.Library
|
||||
//if (MyItemInfo.InList(39048)) Console.WriteLine("Here");
|
||||
}
|
||||
MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier);
|
||||
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin);
|
||||
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin, MyItemInfo.ItemID); // C2018-004 ItemID for create meta file for baseline compares
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
if (retval == 0) // problem occurred - paragraph was not able to be printed on page
|
||||
{ // pagination logic needs to be fixed.
|
||||
@@ -1312,7 +1312,7 @@ namespace Volian.Print.Library
|
||||
// B2017-241 Adjust Bottom Message Location for the figure
|
||||
MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier);
|
||||
// B2017-112 Adjust Image Size by Scaler (Used for Facing Pages - Sup Info)
|
||||
retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier * ImageScaler, Height * MyPageHelper.YMultiplier * ImageScaler, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"));
|
||||
retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier * ImageScaler, Height * MyPageHelper.YMultiplier * ImageScaler, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"), MyItemInfo.ItemID); // C2018-004 added ItemID for create meta file for baseline compares
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1367,7 +1367,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
// B2017-241 Adjust Bottom Message Location for the figure
|
||||
MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier);
|
||||
retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"));
|
||||
retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"), MyItemInfo.ItemID);
|
||||
}
|
||||
}
|
||||
// The following code was added to fix B2016-219 (for VCS, the centerline drew through a figure). The 'top' value was taken from the code
|
||||
@@ -1412,20 +1412,25 @@ namespace Volian.Print.Library
|
||||
{
|
||||
ItemInfo ii = (ItemInfo)MyItemInfo.MyActiveSection;
|
||||
int indx = (int)MyItemInfo.MyActiveSection.MyDocStyle.IndexOtherThanFirstPage;
|
||||
bool reassignedDocStyle = false; // C2018-004 create meta file for baseline compares
|
||||
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
||||
{
|
||||
if (ds.Index == indx)
|
||||
{
|
||||
// C2018-004 create meta file for baseline compares
|
||||
Volian.Base.Library.BaselineMetaFile.WriteLine("Reset DocStyle to \"{0}\"",ds.Name);
|
||||
MyItemInfo.MyActiveSection.MyDocStyle = ds;
|
||||
MyPageHelper.MySection = MyItemInfo.MyActiveSection as SectionInfo;
|
||||
MyPageHelper.MySection.MyDocStyle = ds;
|
||||
MyPageHelper.ResetSvg();
|
||||
//MyPageHelper.ResetSvg(); this is done when MyPageHelper.MySection is assigned - no need to do again.
|
||||
reassignedDocStyle = true; // C2018-004 create meta file for baseline compares
|
||||
break;
|
||||
}
|
||||
}
|
||||
MyPageHelper.DidFirstPageDocStyle = true;
|
||||
if (DebugPagination.IsOpen) DebugPagination.WriteLine("ResetDocStyleAndValues");
|
||||
MyPageHelper.MySection = (SectionInfo)MyItemInfo.MyActiveSection;
|
||||
if (!reassignedDocStyle) // C2018-004 create meta file for baseline compares
|
||||
MyPageHelper.MySection = (SectionInfo)MyItemInfo.MyActiveSection;
|
||||
yTopMargin = _PointsPerPage - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.TopMargin;
|
||||
yBottomMargin = Math.Max(0, yTopMargin - (float)MyItemInfo.MyActiveSection.MyDocStyle.Layout.PageLength);
|
||||
}
|
||||
@@ -1676,9 +1681,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
MyPromsPrinter.InsertBlankPage(cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1746,9 +1749,7 @@ namespace Volian.Print.Library
|
||||
// preceeding foldout.
|
||||
if (MyItemInfo.FoldoutIndex() <= -1)
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
MyPromsPrinter.InsertBlankPage(cb);
|
||||
//_MyLog.InfoFormat("NewPage 10 blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
}
|
||||
@@ -1859,9 +1860,7 @@ namespace Volian.Print.Library
|
||||
MyPromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper, MyItemInfo.MyHLS.FoldoutIndex(), false); // temporary foldout
|
||||
else if (PromsPrinter.MyFoldoutReader.Count > 0 && MyPageHelper.MyPromsPrinter.InsertBlankPages)
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
MyPromsPrinter.InsertBlankPage(cb);
|
||||
_MyLog.InfoFormat("NewPage Break within step blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.Merge && !MyPageHelper.CreatingSupInfoPage && !MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyProcedure as ProcedureInfo).ProcHasSupInfoData)
|
||||
@@ -1873,9 +1872,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
MyPromsPrinter.InsertBlankPage(cb);
|
||||
}
|
||||
}
|
||||
// if there is a 'container vlnbox' around the HLS, flag that the drawn box must also break:
|
||||
@@ -2016,9 +2013,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
// insert a blank page if this step section had a foldout associated and the checkbox
|
||||
// on the print dialog, to add blank pages, is checked
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
MyPromsPrinter.InsertBlankPage(cb);
|
||||
//_MyLog.InfoFormat("NewPage 12 lpi blank {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
}
|
||||
// See comments under case 0 explaining supinfo/facing page processing.
|
||||
@@ -2032,9 +2027,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
MyPageHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
MyPromsPrinter.NewPage();
|
||||
MyPromsPrinter.InsertBlankPage(cb);
|
||||
}
|
||||
}
|
||||
if (MyItemInfo.MyDocStyle.LandscapePageList)
|
||||
@@ -2270,7 +2263,6 @@ namespace Volian.Print.Library
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
return yPageStart;
|
||||
}
|
||||
|
||||
private bool IsPrintedStepItemForSupInfo()
|
||||
{
|
||||
bool printedMySectTitle = true;
|
||||
|
Reference in New Issue
Block a user