This commit is contained in:
parent
2dcb0a0bd6
commit
98a1eb3de4
@ -27,8 +27,13 @@ namespace Volian.Print.Library
|
||||
}
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||
{
|
||||
string fontFace = MyFont.WindowsFont.Name;
|
||||
int fontStyle = (MyFont.WindowsFont.Bold ? iTextSharp.text.Font.BOLD : 0) + (MyFont.WindowsFont.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
||||
iTextSharp.text.Font itextFont = Volian.Svg.Library.Svg.GetFont(fontFace, MyFont.WindowsFont.Size, fontStyle, System.Drawing.Color.Black);
|
||||
float hdrwidth = itextFont.BaseFont.GetWidthPoint(Text, MyFont.WindowsFont.Size);
|
||||
hdrwidth += 1;
|
||||
float yLocation = CalculateYOffset(yPageStart, yTopMargin);
|
||||
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, HeaderWidth, 100, "", yBottomMargin);
|
||||
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, hdrwidth, 100, "", yBottomMargin);
|
||||
return yPageStart;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user