This commit is contained in:
@@ -340,19 +340,6 @@ namespace Volian.Print.Library
|
||||
if ((mySection.MyContent.Number.ToUpper() == "FOLDOUT") != doingFoldout) continue;
|
||||
//if ((mySection.MyContent.Number.ToUpper() == "FOLDOUT" || mySection.MyContent.Text.ToUpper() == "FOLDOUT" ) != doingFoldout) continue;
|
||||
SectionConfig sc = mySection.MyConfig as SectionConfig;
|
||||
#if AllButFirstPage
|
||||
if (_MyHelper != null && mySection.IsStepSection && mySection.MyPrevious != null && mySection.MyPrevious.IsStepSection)
|
||||
{
|
||||
//SectionConfig.SectionPagination sPag = SectionConfig.SectionPagination.Separate;
|
||||
//sPag = sc.Section_Pagination;
|
||||
//if (sPag == SectionConfig.SectionPagination.Continuous)
|
||||
if (sc.Section_Pagination == SectionConfig.SectionPagination.Continuous)
|
||||
{
|
||||
if (mySection.MyDocStyle.StructureStyle.Where == E_DocStyleUse.UseOnFirstPage)
|
||||
mySection.DidFirstPageDocStyle = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
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++);
|
||||
@@ -396,6 +383,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyHelper.DidFirstPageDocStyle = false;
|
||||
if (!mySection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
|
||||
_MyHelper.MySection = mySection;
|
||||
OnStatusChanged("After Set Svg", PromsPrinterStatusType.SetSVG);
|
||||
@@ -474,6 +462,7 @@ namespace Volian.Print.Library
|
||||
_MyHelper.MyTOCPageNums.Add(tockey, _MyHelper.CurrentPageNumber+1);
|
||||
}
|
||||
}
|
||||
float origYoff = (float)mySection.MyDocStyle.Layout.TopMargin;
|
||||
for (int ii = 0; ii < sectPageCount; ii++)
|
||||
{
|
||||
int pageNumber = 1 + ii;
|
||||
@@ -495,7 +484,9 @@ namespace Volian.Print.Library
|
||||
OnStatusChanged("Read MSWord", PromsPrinterStatusType.ReadMSWord);
|
||||
if (doimport2)
|
||||
{
|
||||
AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, 0, 0);
|
||||
float yoff = 0;
|
||||
if (_MyHelper.DidFirstPageDocStyle) yoff = origYoff - (float)mySection.MyDocStyle.Layout.TopMargin;
|
||||
AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, 0, yoff);
|
||||
DebugPagination.WriteLine("{0},'{1}',{2}",
|
||||
_MyHelper.MyPdfContentByte.PdfWriter.CurrentPageNumber, mySection.ShortPath,pageNumber);
|
||||
|
||||
@@ -520,7 +511,12 @@ namespace Volian.Print.Library
|
||||
}
|
||||
OnStatusChanged("Before NewPage", PromsPrinterStatusType.Before);
|
||||
cb.PdfDocument.NewPage(); // Word Document
|
||||
|
||||
|
||||
// if this document style has another style that is for pages other than first, we need to
|
||||
// reset the document style off of this section AND reset docstyle values used.
|
||||
_MyHelper.DidFirstPageDocStyle = true;
|
||||
if ((mySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
||||
_MyHelper.MySection = mySection; // this resets the docstyle/pagestyle if pagehelper
|
||||
OnStatusChanged("After NewPage", PromsPrinterStatusType.NewPage);
|
||||
}
|
||||
}
|
||||
@@ -529,7 +525,6 @@ namespace Volian.Print.Library
|
||||
cb.PdfDocument.NewPage(); // can we put out 'error on page'?
|
||||
}
|
||||
}
|
||||
|
||||
private void GenerateTOC(SectionInfo tocSection, ProcedureInfo myProcedure, PdfContentByte cb, PdfLayer textLayer)
|
||||
{
|
||||
iTextSharp.text.pdf.PdfWriter writer = cb.PdfWriter;
|
||||
@@ -675,10 +670,6 @@ namespace Volian.Print.Library
|
||||
private float _NoBreakYPageStart = 0;
|
||||
private void CreateStepPdf(SectionInfo section, PdfContentByte cb)
|
||||
{
|
||||
//section.PageNumForDocStyle = 1;
|
||||
#if AllButFirstPage
|
||||
section.DidFirstPageDocStyle = false; // first step of the section
|
||||
#endif
|
||||
iTextSharp.text.pdf.PdfWriter writer = cb.PdfWriter;
|
||||
ItemInfo myItemInfo = section as ItemInfo;
|
||||
// 792: 72 * 11 inches - TopRow - Top is high value
|
||||
@@ -694,7 +685,7 @@ namespace Volian.Print.Library
|
||||
float localYPageStart = 0;
|
||||
float yPageStart = yTopMargin;
|
||||
if (myItemInfo.HasChildren)
|
||||
localYPageStart = myParagraph.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
|
||||
localYPageStart = myParagraph.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
|
||||
else
|
||||
PrintTextMessage(cb, "No Section Content", _TextLayer);
|
||||
SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default
|
||||
|
Reference in New Issue
Block a user