Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Print on 2 pages

This shouldn't be that tough. I am building a print job and want the text to print on 2 pages in the same print job. I need to send it to a duplex printer and print the first part on the front page and the second part on the back page. Anyway, here is the code I have so far. As you can see I tried to just insert a page break, but that didn't work.

Thanks

Dim newImage As Image = PictureBox1.Image
Dim newimage2 As Image = PictureBox2.Image
Dim font1 As New Font("Arial", 12, FontStyle.Regular)
Dim font2 As New Font("Arial", 12, FontStyle.Bold)
Dim font3 As New Font("Arial", 36)
Dim stringformat As New StringFormat
stringformat.Alignment = StringAlignment.Center

e.Graphics.DrawImage(newImage, 1, 1, 334, 210)
e.Graphics.DrawImage(newimage2, 113, 20, 108, 144)
e.Graphics.DrawString(Label1.Text, font1, Brushes.Black, 167, 164, stringformat)
e.Graphics.DrawString(Label2.Text, font2, Brushes.Black, 167, 184, stringformat)
e.Graphics.DrawString(vbFormFeed, font1, Brushes.White, 0, 211, stringformat)
e.Graphics.DrawString("*123456789*", font3, Brushes.Black, 167, 220, stringformat)
[1272 byte] By [JGDH] at [2007-11-11 9:42:27]
# 1 Re: Print on 2 pages
Figured it out never mind.

Thanks
JGDH at 2007-11-11 21:45:32 >