Q:

Print document text invisible

I am trying to build recipe application. Here is a sample

I am using text boxes to fill all fields and after I fill all fields I print them with this code 
private void button1_Click(object sender, EventArgs e)
{
    PrintDialog pd = new PrintDialog();
    PrintDocument doc = new PrintDocument();
    doc.PrintPage += PrintPage;
    pd.Document = doc;
    if (pd.ShowDialog() == DialogResult.OK)
        doc.Print();
}

private void PrintPage(object sender, PrintPageEventArgs e)
{
    Font myfont = new Font("Arial", 12);
    e.Graphics.DrawImage(pictureBox1.BackgroundImage, 0, 0);
    e.Graphics.DrawString(textBox1.Text, myfont, Brushes.Black, 157, 164);
    e.Graphics.DrawImage(pictureBox1.Image, 0, 0);
    e.Graphics.Dispose();
}

My problem is after I save file as PDF when I'm open it I can only see the text for like 1 second and then it disappear and if i double click in the spot where text should be I can copy the text from there...

I've been thinking maybe it's something about text transparency or picture box transparency changed few properties there and there but still no success.

A:

After calling the DrawString method there is another call to DrawImage.
I think that the image is being drawn on top of your textbox.
Try calling DrawString after both of the DrawImage calls.

