This commit is contained in:
parent
4625ac41f5
commit
5362b9f4d0
@ -290,7 +290,10 @@ namespace Volian.Print.Library
|
||||
int progress = 0;
|
||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||
{
|
||||
|
||||
if ((mySection.MyContent.Number.ToUpper() == "FOLDOUT") != doingFoldout) continue;
|
||||
PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;
|
||||
PrintOverride.CompressSub = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub;
|
||||
OnStatusChanged((mySection.DisplayNumber ?? "") == "" ? mySection.DisplayText : mySection.DisplayNumber, PromsPrinterStatusType.Progress, progress++);
|
||||
// Set up Helper for the particular Section
|
||||
if (_MyHelper == null)
|
||||
@ -299,7 +302,7 @@ namespace Volian.Print.Library
|
||||
_MyHelper.MyPdfWriter = cb.PdfWriter;
|
||||
_MyHelper.CreatingFoldoutPage = doingFoldout;
|
||||
_MyHelper.MyPdfContentByte = cb;
|
||||
|
||||
if (!mySection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
|
||||
if (DebugOutput)
|
||||
{
|
||||
// 16-bit background
|
||||
@ -328,11 +331,13 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!mySection.IsStepSection)_MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
|
||||
_MyHelper.MySection = mySection;
|
||||
OnStatusChanged("After Set Svg", PromsPrinterStatusType.SetSVG);
|
||||
}
|
||||
PdfReader readerWord = null;
|
||||
string myPdfFile = null;
|
||||
|
||||
if (mySection.IsStepSection)
|
||||
{
|
||||
if ((mySection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0)
|
||||
@ -385,7 +390,8 @@ namespace Volian.Print.Library
|
||||
iTextSharp.text.Paragraph para = new Paragraph(mySection.MyDocStyle.End.Message, fnt);
|
||||
float wtpm = (float)mySection.MyDocStyle.Layout.PageWidth - (float)mySection.MyDocStyle.Layout.LeftMargin;
|
||||
float centerpos = (float)mySection.MyDocStyle.Layout.LeftMargin + (wtpm - (mySection.MyDocStyle.End.Message.Length * mySection.MyDocStyle.End.Font.CharsToTwips)) / 2;
|
||||
Rtf2Pdf.TextAt(cb, para, centerpos, ylocation + 6, 100, 12, "", 50);
|
||||
float yBottomMargin = Math.Max(0, (float)mySection.MyDocStyle.Layout.TopMargin - (float)mySection.MyDocStyle.Layout.PageLength - 2 * vlnPrintObject.SixLinesPerInch);
|
||||
Rtf2Pdf.TextAt(cb, para, centerpos, ylocation + 6, 100, 12, "", yBottomMargin);
|
||||
}
|
||||
OnStatusChanged("Merge MSWord", PromsPrinterStatusType.MergeMSWord);
|
||||
}
|
||||
@ -453,13 +459,10 @@ namespace Volian.Print.Library
|
||||
myParagraph.ToPdf(cb, yTopMargin, yTopMargin, yBottomMargin);
|
||||
else
|
||||
PrintTextMessage(cb, "No Section Content", _TextLayer);
|
||||
ItemInfo nxtSection = null;
|
||||
SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default
|
||||
if ( section.NextItemCount > 0)
|
||||
{
|
||||
SectionInfo tmpii = SectionInfo.Get(section.NextItem.ItemID);
|
||||
if (tmpii == null) Console.WriteLine("here");
|
||||
nxtSection = tmpii;
|
||||
if (!section.IsAccPages)
|
||||
{
|
||||
SectionConfig sc = tmpii.SectionConfig;
|
||||
@ -473,7 +476,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
//if (nxtSection != null && sp == SectionConfig.SectionPagination.Separate)
|
||||
if (sp == SectionConfig.SectionPagination.Separate)
|
||||
{
|
||||
cb.PdfDocument.NewPage(); // end of step section
|
||||
|
Loading…
x
Reference in New Issue
Block a user