This commit is contained in:
parent
ea0d4749e2
commit
e45eb154ea
@ -103,6 +103,10 @@ namespace Volian.Print.Library
|
|||||||
/// This variable is used to match 16 bit pagaination
|
/// This variable is used to match 16 bit pagaination
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool _Match16BitPagination = false;
|
private bool _Match16BitPagination = false;
|
||||||
|
// the following boolean is to help testing of various formats. If the plant has an alternating foldout
|
||||||
|
// and you want a blank page, until foldouts are developed, set to true.
|
||||||
|
// AEP DU1 - do a blank page for foldout
|
||||||
|
private bool _DoBlankForFoldout = false;
|
||||||
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
public float ParagraphToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||||
{
|
{
|
||||||
if (Processed) return yPageStart;
|
if (Processed) return yPageStart;
|
||||||
@ -259,7 +263,13 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
case 1: // Break on High Level Step
|
case 1: // Break on High Level Step
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
|
if (_DoBlankForFoldout&&MyItemInfo.ActiveSection.IsDefaultSection)
|
||||||
|
{
|
||||||
|
cb.PdfDocument.NewPage();
|
||||||
|
cb.Circle(100, 100, 50);
|
||||||
|
}
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
|
|
||||||
yPageStart = yTopMargin + YTopMost;
|
yPageStart = yTopMargin + YTopMost;
|
||||||
MyPageHelper.YMultiplier = 1;
|
MyPageHelper.YMultiplier = 1;
|
||||||
break;
|
break;
|
||||||
@ -267,21 +277,30 @@ namespace Volian.Print.Library
|
|||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
||||||
string myMsg = docstyle.Continue.Bottom.Message;
|
string myMsg = docstyle.Continue.Bottom.Message;
|
||||||
if (myMsg.IndexOf(@"%d") > -1)
|
if (myMsg != null && myMsg != "")
|
||||||
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanText.Trim());
|
|
||||||
float msg_yLocation = 0;
|
|
||||||
switch (docstyle.Continue.Bottom.Location)
|
|
||||||
{
|
{
|
||||||
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
if (myMsg.IndexOf(@"%d") > -1)
|
||||||
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
|
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanText.Trim());
|
||||||
Console.WriteLine("Not done yet");
|
float msg_yLocation = 0;
|
||||||
break;
|
switch (docstyle.Continue.Bottom.Location)
|
||||||
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
{
|
||||||
msg_yLocation = yBottomMargin + 2 * SixLinesPerInch; // 2 lines above bottom margin
|
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
||||||
break;
|
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
|
||||||
|
Console.WriteLine("Not done yet");
|
||||||
|
break;
|
||||||
|
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
||||||
|
msg_yLocation = yBottomMargin + 2 * SixLinesPerInch; // 2 lines above bottom margin
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0, msg_yLocation, MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||||
|
}
|
||||||
|
if (_DoBlankForFoldout && MyItemInfo.ActiveSection.IsDefaultSection)
|
||||||
|
{
|
||||||
|
cb.PdfDocument.NewPage();
|
||||||
|
cb.Circle(200, 100, 50);
|
||||||
}
|
}
|
||||||
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0, msg_yLocation, MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
|
|
||||||
// If there is a box, adjust the yTopMost to include it.
|
// If there is a box, adjust the yTopMost to include it.
|
||||||
// TODO: Why doesn't YTopMost account for the box?
|
// TODO: Why doesn't YTopMost account for the box?
|
||||||
float yTopMost = YTopMost;
|
float yTopMost = YTopMost;
|
||||||
@ -289,15 +308,23 @@ namespace Volian.Print.Library
|
|||||||
yTopMost = Math.Min(yTopMost,YVeryTop);
|
yTopMost = Math.Min(yTopMost,YVeryTop);
|
||||||
yPageStart = yTopMargin + yTopMost - 2 * SixLinesPerInch;
|
yPageStart = yTopMargin + yTopMost - 2 * SixLinesPerInch;
|
||||||
myMsg = docstyle.Continue.Top.Message;
|
myMsg = docstyle.Continue.Top.Message;
|
||||||
if (myMsg.IndexOf(@"%d") > -1)
|
if (myMsg != null && myMsg != "")
|
||||||
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanText.Trim());
|
{
|
||||||
MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Top.Margin ?? 0, yTopMargin + 0.1F, MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
if (myMsg.IndexOf(@"%d") > -1)
|
||||||
|
myMsg = myMsg.Replace(@"%d", MyItemInfo.MyHLS.MyTab.CleanText.Trim());
|
||||||
|
MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Top.Margin ?? 0, yTopMargin + 0.1F, MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||||
|
}
|
||||||
MyPageHelper.YMultiplier = 1;
|
MyPageHelper.YMultiplier = 1;
|
||||||
break;
|
break;
|
||||||
case 3: // Break on High Level Step (SevenLinesPerInch)
|
case 3: // Break on High Level Step (SevenLinesPerInch)
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
|
if (_DoBlankForFoldout && MyItemInfo.ActiveSection.IsDefaultSection)
|
||||||
|
{
|
||||||
|
cb.PdfDocument.NewPage();
|
||||||
|
cb.Circle(300, 100, 50);
|
||||||
|
}
|
||||||
cb.PdfDocument.NewPage();
|
cb.PdfDocument.NewPage();
|
||||||
|
|
||||||
yPageStart = yTopMargin + YTopMost;
|
yPageStart = yTopMargin + YTopMost;
|
||||||
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
MyPageHelper.YMultiplier = _SevenLinesPerInch / SixLinesPerInch;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user