If we cannot find a space character to split on, then break up the word ( SplitText function)
This commit is contained in:
parent
beb97b57e8
commit
e6b45641cd
@ -144,14 +144,15 @@ namespace Volian.Print.Library
|
||||
set { _PrintedSectionPage = value; }
|
||||
}
|
||||
|
||||
private bool _AddBlankPagesForDuplexPrinting = false;
|
||||
public bool AddBlankPagesForDuplexPrinting // Tells us if a the option to add a blank page is turn on (for procedures with duplex foldouts)
|
||||
{
|
||||
get { return _AddBlankPagesForDuplexPrinting; }
|
||||
set { _AddBlankPagesForDuplexPrinting = value; }
|
||||
}
|
||||
//private bool _AddBlankPagesForDuplexPrinting = false;
|
||||
//public bool AddBlankPagesForDuplexPrinting // Tells us if a the option to add a blank page is turn on (for procedures with duplex foldouts)
|
||||
//{
|
||||
// get { return _AddBlankPagesForDuplexPrinting; }
|
||||
// set { _AddBlankPagesForDuplexPrinting = value; }
|
||||
//}
|
||||
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
|
||||
{
|
||||
bool onBlankPage = OnBlankPage;
|
||||
if (OnBlankPage)
|
||||
{
|
||||
OnBlankPage = false;
|
||||
@ -198,6 +199,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if ((MySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS)
|
||||
DrawHorizontal(writer.DirectContent, (float)MySection.MyDocStyle.Layout.LeftMargin, (float)MySection.MyDocStyle.Layout.PageWidth, (float)MySection.MyDocStyle.CenterLineYTop);
|
||||
//if (MySection.ColumnMode > 0 && onBlankPage == false)
|
||||
if (MySection.ColumnMode > 0)
|
||||
DrawCenterLine(writer.DirectContent, MySection.MyDocStyle.Layout.LeftMargin + MySection.MyDocStyle.CenterLineX ?? 0, MySection.MyDocStyle.CenterLineYTop ?? 0, MySection.MyDocStyle.CenterLineYBottom ?? 0);
|
||||
}
|
||||
@ -1780,6 +1782,13 @@ namespace Volian.Print.Library
|
||||
if (width > len)
|
||||
{
|
||||
// what should be done if lastspace == 0
|
||||
// cannot find space char to split on, so break the word
|
||||
// not ideal but PROMS was bombing otherwise - jsj 7/7/2014
|
||||
if (lastspace == 0)
|
||||
{
|
||||
lastspace = indx;
|
||||
startNonRtf = width - 1;
|
||||
}
|
||||
results.Add(nextprefix+text.Substring(start, lastspace-start).Trim(" ".ToCharArray()));
|
||||
nextprefix = rtfprefix;
|
||||
if (nextprefix != "") nextprefix += " ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user