I want to print a variable text string in more than one page.
Where I add a number and a repeating alliance to define the number and I want to print to the end of the group and the ring of numbers used.
I used the following code and it does what is needed if the printer is A4
.The code does not work at all when using a barcode printer (paper size 40*25). What is the problem when the printer is different?
Pages keep coming back indefinitely and the repetition doesn't stop forever.
Private printLine As Integer = 0 Dim startX As Integer = e.MarginBounds.Left Dim startY As Integer = e.MarginBounds.Top Do While printLine < 10 If startY + PictureBox1.Height > e.MarginBounds.Bottom Then e.HasMorePages = True Exit Do End If e.Graphics.DrawString(" good " & printLine.ToString, Me.Font, Brushes.Black, startX, startY) startY += PictureBox1.Height printLine += 1 Loop