I would print rectangle in specified position from c# application. For example 1 centimeter from the left edge of sheet and 1 centimeter from the top edge of sheet.
I tried something like this:
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Brush brush = new SolidBrush(Color.Black);
Pen blackPen = new Pen(Color.Black, 1);
e.Graphics.PageUnit = GraphicsUnit.Millimeter;
e.PageSettings.Margins = new Margins(10, 10, 10, 10);
Rectangle rect = new Rectangle(10, 10, 50, 90);
e.Graphics.DrawRectangle(blackPen, rect);
}
But it does not work correctly.