Support for SAMGS Supplemental Information

This commit is contained in:
2017-05-03 14:37:25 +00:00
parent e7f9d4e3ed
commit f139c79d32
14 changed files with 1513 additions and 682 deletions

View File

@@ -78,6 +78,39 @@ namespace Volian.Print.Library
ShowPageBreak(1, "Page Break before empty section", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
return 1;
}
// If printing a supinfo part, add an entry to the dictionary that says what page I am on.
if (MyPageHelper.PrintingSupplmentalInformation)
{
int retval = 0;
// came across a user defined preferred page break, increment the page count for the supplemental info pdf & return 1 to break the page.
// the PrefPageBreak is set when creating the paragraphs (see vlnParagraph constructor)
if (PrefPageBreak)
{
MyPromsPrinter.SupInfoPdfPageCount++;
retval = 1;
}
// Printing the supplemental information pages to a pdf: add an item to the dictionary that says what page in the supinfo pdf
// this item can be found on.
if (MyItemInfo.IsSupInfoPart)
{
MyPromsPrinter.SupInfoPdfPage.Add(MyItemInfo.ItemID, MyPromsPrinter.SupInfoPdfPageCount);
}
return retval;
}
else if (MyItemInfo.MyDocStyle.SupplementalInformation && MyItemInfo.IsStep)
{
StepConfig sci = MyItemInfo.MyConfig as StepConfig;
if (sci.Step_PreferredPagebreak)
{
if (MyItemInfo.IsHigh) return 1;
// if this is the top caution/note return 1 also. Cautions always are first, that is why the check does not need to know if on a
// caution that there are notes, but check does need if on a note, are there cautions:
if (MyItemInfo.IsCaution && MyItemInfo.MyPrevious == null) return 1;
if (MyItemInfo.IsNote && (MyItemInfo.MyParent.Cautions == null || MyItemInfo.MyParent.Cautions.Count == 0) && MyItemInfo.MyPrevious == null) return 1;
return 2;
}
}
// if the EndForSingle format flag is set to false, then we do not print an End message if the section
// is a single column section.
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;