This commit is contained in:
@@ -76,12 +76,17 @@ namespace Volian.Print.Library
|
||||
set { _MyPdfContentByte = value; }
|
||||
}
|
||||
private int _FinalMessageSectionID;
|
||||
|
||||
public int FinalMessageSectionID
|
||||
{
|
||||
get { return _FinalMessageSectionID; }
|
||||
set { _FinalMessageSectionID = value; }
|
||||
}
|
||||
private bool _DidFirstPageDocStyle = false;
|
||||
public bool DidFirstPageDocStyle
|
||||
{
|
||||
get { return _DidFirstPageDocStyle; }
|
||||
set { _DidFirstPageDocStyle = value; }
|
||||
}
|
||||
public override void OnCloseDocument(PdfWriter writer, iTextSharp.text.Document document)
|
||||
{
|
||||
AddBookmarks(writer);
|
||||
@@ -91,6 +96,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (!OnFoldoutPage)
|
||||
{
|
||||
if (DidFirstPageDocStyle) ResetDocStyleAndValues();
|
||||
AddBookmarks(writer);
|
||||
MyPageCounts.CanIncrement = true;
|
||||
base.OnEndPage(writer, document);
|
||||
@@ -113,6 +119,26 @@ namespace Volian.Print.Library
|
||||
PageListTopCheckOffHeader = null;
|
||||
PageListLastCheckOffHeader = null;
|
||||
YMultiplier = 1;
|
||||
|
||||
}
|
||||
|
||||
private void ResetDocStyleAndValues()
|
||||
{
|
||||
// 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.
|
||||
if ((MySection.MyDocStyle.StructureStyle.Where & E_DocStyleUse.UseOnFirstPage) > 0)
|
||||
{
|
||||
ItemInfo ii = (ItemInfo) MySection;
|
||||
int indx = (int)MySection.MyDocStyle.IndexOtherThanFirstPage;
|
||||
foreach (DocStyle ds in ii.ActiveFormat.PlantFormat.DocStyles.DocStyleList)
|
||||
{
|
||||
if (ds.Index == indx)
|
||||
{
|
||||
MySection.MyDocStyle = ds;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void DrawRuler(PdfContentByte cb)
|
||||
{
|
||||
@@ -215,31 +241,34 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private void DrawMessages(PdfContentByte cb)
|
||||
{
|
||||
float tmp = 0;
|
||||
if (TopMessage != null)
|
||||
{
|
||||
TopMessage.ToPdf(cb, 0, 0, 0);
|
||||
TopMessage.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
TopMessage = null; // Only output it once.
|
||||
}
|
||||
if (BottomMessage != null)
|
||||
{
|
||||
BottomMessage.ToPdf(cb, 0, 0, 0);
|
||||
BottomMessage.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
BottomMessage = null; // Only output it once.
|
||||
}
|
||||
}
|
||||
public void DrawBottomMessage(PdfContentByte cb)
|
||||
{
|
||||
float tmp = 0;
|
||||
if (BottomMessage != null)
|
||||
{
|
||||
BottomMessage.ToPdf(cb, 0, 0, 0);
|
||||
BottomMessage.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
BottomMessage = null; // Only output it once.
|
||||
}
|
||||
}
|
||||
private void DrawChangeBars(PdfContentByte cb)
|
||||
{
|
||||
float tmp = 0;
|
||||
foreach (vlnChangeBar vcb in MyChangeBars)
|
||||
{
|
||||
// TODO: Pass in zeroes because topdf is inherited.
|
||||
vcb.ToPdf(cb, 0, 0, 0);
|
||||
vcb.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
}
|
||||
_MyChangeBars = new List<vlnChangeBar>();
|
||||
}
|
||||
@@ -271,6 +300,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
_MySection = value;
|
||||
MySectionTitle = ((_MySection.DisplayNumber ?? "")=="" ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
|
||||
if (DidFirstPageDocStyle) ResetDocStyleAndValues();
|
||||
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection);
|
||||
if (sectSvg != null) MySvg = sectSvg;
|
||||
}
|
||||
@@ -651,9 +681,6 @@ namespace Volian.Print.Library
|
||||
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
||||
{
|
||||
VE_Font useFontForCheckOffHeader = null;
|
||||
#if AllButFirstPage
|
||||
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& ((pageItem.Row < 0) || section.DidFirstPageDocStyle)))
|
||||
#endif
|
||||
if (sPag == SectionConfig.SectionPagination.Separate || ((sPag == SectionConfig.SectionPagination.Continuous || sPag ==0 )&& (pageItem.Row < 0)))
|
||||
{
|
||||
//if (PrevRow > 0)
|
||||
|
Reference in New Issue
Block a user