This commit is contained in:
@@ -442,6 +442,7 @@ namespace Volian.Print.Library
|
||||
if (textLayer != null) cb.EndLayer();
|
||||
}
|
||||
private float _NoBreakYOffset = 0;
|
||||
private float _NoBreakYPageStart = 0;
|
||||
private void CreateStepPdf(SectionInfo section, PdfContentByte cb)
|
||||
{
|
||||
iTextSharp.text.pdf.PdfWriter writer = cb.PdfWriter;
|
||||
@@ -456,8 +457,10 @@ namespace Volian.Print.Library
|
||||
Rtf2Pdf.Offset = new PointF(0, 2.5F);
|
||||
_MyHelper.ChangeBarDefinition = MyChangeBarDefinition;
|
||||
vlnParagraph myParagraph = new vlnParagraph(null, cb, myItemInfo, (float)myItemInfo.MyDocStyle.Layout.LeftMargin, _NoBreakYOffset, 0, myItemInfo.ColumnMode, myItemInfo.ActiveFormat);
|
||||
float localYPageStart = 0;
|
||||
float yPageStart = yTopMargin;
|
||||
if (myItemInfo.HasChildren)
|
||||
myParagraph.ToPdf(cb, yTopMargin, yTopMargin, yBottomMargin);
|
||||
localYPageStart = myParagraph.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
|
||||
else
|
||||
PrintTextMessage(cb, "No Section Content", _TextLayer);
|
||||
SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default
|
||||
@@ -483,10 +486,16 @@ namespace Volian.Print.Library
|
||||
{
|
||||
cb.PdfDocument.NewPage(); // end of step section
|
||||
_NoBreakYOffset = 0;
|
||||
yPageStart = yTopMargin;
|
||||
}
|
||||
else
|
||||
{
|
||||
float tmplocal = localYPageStart;
|
||||
_NoBreakYOffset = myParagraph.YBottomMost;
|
||||
float yOffset = localYPageStart - yTopMargin;
|
||||
_NoBreakYOffset -= yOffset;
|
||||
yPageStart = localYPageStart;
|
||||
Volian.Base.Library.DebugText.WriteLine("NOBREAK:{0},'{1}','{2}','{3}','{4}','{5}'", section.ItemID, tmplocal, yTopMargin, localYPageStart, _NoBreakYOffset, myParagraph.YBottomMost);
|
||||
}
|
||||
OnStatusChanged("StepSection converted to PDF " + section.ShortPath, PromsPrinterStatusType.BuildStep);
|
||||
}
|
||||
|
Reference in New Issue
Block a user