31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using iTextSharp.text;
|
|
using iTextSharp.text.pdf;
|
|
|
|
namespace De.Lambertz.ODAL
|
|
{
|
|
public class BestellungsDruckerEvents : PdfPageEventHelper
|
|
{
|
|
public override void OnEndPage(PdfWriter writer, Document doc)
|
|
{
|
|
PdfPCell cell; //Standard Zelle, nur Dekleration
|
|
Paragraph p; //Standard Paragraph, nur Dekleration
|
|
|
|
float[] widths = {1};
|
|
PdfPTable table = new PdfPTable(widths);
|
|
table.TotalWidth = 100f;
|
|
|
|
p = new Paragraph(ML.GetInstance().Txt(ML.DRK_SEITE_P1, doc.PageNumber.ToString()));
|
|
p.Font.Size = 9;
|
|
p.Font.SetStyle(Font.BOLD);
|
|
cell = new PdfPCell(p);
|
|
cell.HorizontalAlignment = PdfCell.ALIGN_RIGHT;
|
|
cell.VerticalAlignment = PdfCell.ALIGN_BOTTOM;
|
|
cell.Border = PdfCell.NO_BORDER;
|
|
table.AddCell(cell);
|
|
|
|
PdfContentByte cb = writer.DirectContent;
|
|
table.WriteSelectedRows(0, -1, doc.PageSize.Width-130f , 39f, cb);
|
|
}
|
|
}
|
|
}
|