As I am more familiar with Windows Forms I would chose that path, unless there is a requirement to use WPF.
Create a form with the number of
TextBox
you need, add a
PictureBox
for the ID photo and add a
PrintPreviewControl[
^] to the form.
Every time toy change any data or the picture, you call the method
printPreviewControl.InvalidatePreview()
.
You also need a
PrintDocument[
^] that you connect to the
PrintPreviewControl
.
Implement the event PrintDocument.PrintPage and do all drawing here.
Small example: (You have better examples at MSDN)
private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
{
Graphics g = e.Graphics;
if (pictureBox.Image != null)
g.DrawImage(pictureBox.Image, 0, 0, 200, 200);
g.DrawString("Hello World", new Font("Arial", 10.0F),
new SolidBrush(Color.Blue), 10, 250);
}
Note that the units are in 100 of an inch. (4" = 400 units)
This way you can "print" everything to the preview control instead of wasting paper.
When you want to send the data to a printer, call the method
PrintDocument.Print()
.