RO table was failing in DoCOlorLink. This does not fix the problem.
More fixes to support 7LPI when printing grids.
This commit is contained in:
parent
1479746212
commit
ea85aeba23
@ -10,6 +10,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
public class DisplayText
|
public class DisplayText
|
||||||
{
|
{
|
||||||
|
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
#region Properties
|
#region Properties
|
||||||
private E_FieldToEdit _FieldToEdit;
|
private E_FieldToEdit _FieldToEdit;
|
||||||
public E_FieldToEdit FieldToEdit
|
public E_FieldToEdit FieldToEdit
|
||||||
@ -222,14 +223,32 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
private static string DoColorLinks(string text)
|
private static string DoColorLinks(string text)
|
||||||
{
|
{
|
||||||
|
string origtext = text;
|
||||||
text = Regex.Replace(text, @"(<START\](\\[^v \\]+)*\\v0)((?= |\\))", @"$1\cf1");
|
text = Regex.Replace(text, @"(<START\](\\[^v \\]+)*\\v0)((?= |\\))", @"$1\cf1");
|
||||||
//text = Regex.Replace(text, @"<START]\b0\v0 ", @"<START]\b0\v0\cf1 ");
|
//text = Regex.Replace(text, @"<START]\b0\v0 ", @"<START]\b0\v0\cf1 ");
|
||||||
int indxcf = text.IndexOf("cf1");
|
int indxcf = text.IndexOf(@"\v0\cf1");
|
||||||
|
int indxend = 0;
|
||||||
|
try
|
||||||
|
{
|
||||||
while (indxcf != -1)
|
while (indxcf != -1)
|
||||||
{
|
{
|
||||||
int indxend = text.IndexOf(@"\v", indxcf);
|
indxcf += 4;
|
||||||
|
indxend = text.IndexOf(@"\v", indxcf);
|
||||||
|
if (indxend > -1)
|
||||||
|
{
|
||||||
text = text.Insert(indxend, @"\cf0");
|
text = text.Insert(indxend, @"\cf0");
|
||||||
indxcf = text.IndexOf(@"cf1", indxend);
|
indxcf = text.IndexOf(@"\v0\cf1", indxend);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
indxcf = -1;
|
||||||
|
_MyLog.WarnFormat("DisplayText.DoColorLinks Failed\r\norgitext:'{0}'\r\ntext'{1}'", origtext, text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_MyLog.WarnFormat("DisplayText.DoColorLinks Failed\r\norgitext:'{0}'\r\ntext'{1}'", origtext, text);
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -558,17 +558,13 @@ namespace Volian.Print.Library
|
|||||||
public void ToPdf(iTextSharp.text.pdf.ColumnText myColumnText, float left, float top)
|
public void ToPdf(iTextSharp.text.pdf.ColumnText myColumnText, float left, float top)
|
||||||
{
|
{
|
||||||
myColumnText.Canvas.SaveState();
|
myColumnText.Canvas.SaveState();
|
||||||
|
VlnSvgPageHelper _MyPageHelper = myColumnText.Canvas.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||||
|
float mult = _MyPageHelper.YMultiplier;
|
||||||
float x = MyTable.ColLeft[c1];
|
float x = MyTable.ColLeft[c1];
|
||||||
float w = MyTable.ColLeft[c2 + 1] - x;
|
float w = MyTable.ColLeft[c2 + 1] - x;
|
||||||
float y = MyTable.RowTop[r1];
|
float y = mult * MyTable.RowTop[r1];
|
||||||
float h = MyTable.RowTop[r2 + 1] - y;
|
float h = mult * MyTable.RowTop[r2 + 1] - y;
|
||||||
VlnSvgPageHelper _MyPageHelper = myColumnText.Canvas.PdfWriter.PageEvent as VlnSvgPageHelper;
|
BordersToPdf(myColumnText, left, top, x, w, y, h );
|
||||||
if (_MyPageHelper.YMultiplier != 1F)
|
|
||||||
{
|
|
||||||
Console.WriteLine("'---YMultiplier',{0}", _MyPageHelper.YMultiplier);
|
|
||||||
Console.WriteLine("'---MultipliedLeading',{0}", MyPara.MultipliedLeading);
|
|
||||||
}
|
|
||||||
BordersToPdf(myColumnText, left, top, x, w, y, h * _MyPageHelper.YMultiplier);
|
|
||||||
float hAdjust = VeritcalTextAlignment(h);
|
float hAdjust = VeritcalTextAlignment(h);
|
||||||
iTextSharp.text.pdf.ColumnText myColumnText1 = new iTextSharp.text.pdf.ColumnText(myColumnText.Canvas);
|
iTextSharp.text.pdf.ColumnText myColumnText1 = new iTextSharp.text.pdf.ColumnText(myColumnText.Canvas);
|
||||||
myColumnText1.SetSimpleColumn(1 + left + x, top - y - h, left + x + w, 1 + top - y - hAdjust); // 2 == Default Padding
|
myColumnText1.SetSimpleColumn(1 + left + x, top - y - h, left + x + w, 1 + top - y - hAdjust); // 2 == Default Padding
|
||||||
|
Loading…
x
Reference in New Issue
Block a user