This commit is contained in:
@@ -76,10 +76,10 @@ namespace Volian.Print.Library
|
||||
}
|
||||
#endregion
|
||||
#region Public Methods
|
||||
public void AdjustRowTop(int row, float hNew)
|
||||
public void AdjustRowTop(int row1, int row2, float hNew)
|
||||
{
|
||||
float hAdjust = hNew - (RowTop[row + 1] - RowTop[row]);
|
||||
for (int r = row; r < MyFlexGrid.Rows.Count; r++)
|
||||
float hAdjust = hNew - (RowTop[row2 + 1] - RowTop[row1]);
|
||||
for (int r = row2; r < MyFlexGrid.Rows.Count; r++)
|
||||
RowTop[r + 1] += hAdjust;
|
||||
}
|
||||
public void ToPdf(iTextSharp.text.pdf.ColumnText myColumnText, float left, float top)
|
||||
@@ -147,7 +147,7 @@ namespace Volian.Print.Library
|
||||
str = myRTB.Rtf;
|
||||
}
|
||||
iTextSharp.text.Paragraph myPara = RtfToParagraph(str);
|
||||
myColumnText1.SetSimpleColumn(0, 0, w - 4, MyContentByte.PdfDocument.PageSize.Top); // Padding = 4
|
||||
myColumnText1.SetSimpleColumn(0, 0, w - 2, MyContentByte.PdfDocument.PageSize.Top); // Padding = 4
|
||||
myPara.MultipliedLeading = 1.2F;
|
||||
myColumnText1.AddElement(myPara);
|
||||
//myColumnText1.Canvas.SetColorFill(iTextSharp.text.BaseColor.RED);
|
||||
@@ -156,7 +156,7 @@ namespace Volian.Print.Library
|
||||
float posAfter = myColumnText1.YLine;
|
||||
float hContent = 4 + posBefore - posAfter;
|
||||
if (hContent > h)
|
||||
MyTable.AdjustRowTop(cr.r2, hContent);
|
||||
MyTable.AdjustRowTop(cr.r1, cr.r2, hContent);
|
||||
Add(new vlnCell(cr.r1, cr.c1, cr.r2, cr.c2, MyTable, myPara, hContent));
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
iTextSharp.text.pdf.ColumnText myColumnText1 = new iTextSharp.text.pdf.ColumnText(myColumnText.Canvas);
|
||||
myColumnText1.SetSimpleColumn(2 + left + x, top - y - h, left + x + w - 2, -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
|
||||
myColumnText1.AddElement(MyPara);
|
||||
myColumnText1.Go();
|
||||
myColumnText.Canvas.RestoreState();
|
||||
|
Reference in New Issue
Block a user