Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override void OnCloseDocument(PdfWriter writer, Document document)
- {
- var text = "derp a derp.";
- var len = _baseFont.GetWidthPoint(text, 10);
- // Write text
- _pdfContentByte.BeginText();
- _pdfContentByte.SetFontAndSize(_baseFont, 10);
- _pdfContentByte.SetTextMatrix(document.PageSize.GetRight(120), document.PageSize.GetBottom(30));
- _pdfContentByte.ShowText(text);
- _pdfContentByte.EndText();
- // Write line
- _pdfContentByte.MoveTo(40, document.PageSize.GetBottom(50));
- _pdfContentByte.LineTo(document.PageSize.Width - 40, document.PageSize.GetBottom(50));
- _pdfContentByte.SetLineDash(3f, 3f);
- _pdfContentByte.Stroke();
- _pdfContentByte.SetLineDash(0f);
- base.OnCloseDocument(writer, document);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement