:idea:I'm a bit stuck
I wrote a printing part.
But cant find how to preform a pagefeed

Private Sub PrintBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintBTN.Click
        copieen = 1
        PrintDocument1.PrinterSettings.Copies = copieen
end Sub
 Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        data = "this is a test"
        Dim xx = 2
        Dim y = 0
        For x = 1 To 40
            If Len(machin(xx)) > 0 Then
                e.Graphics.DrawString(machin(xx), New Font("Arial", 10, FontStyle.Bold), Brushes.Black, 0, y)
                y = y + 14
                For u = 1 To 10
                    e.Graphics.DrawString(data, New Font("Arial", 10), Brushes.Black, 10, y)
                    y = y + 14
                Next u
                y = y + 14
                If y = 1008 Then
                    REM Here i need to give the printer a pagefeed and start on a new page
                    y = 0
                End If
            End If
            xx = xx + 16
        Next x
End Sub

Can someone Plzzzzz help me

Why on earth would you want to write your own printer code? I have done it and I promise you don't want to!

This code is only to print the right data
I was only expecting a page feed command in the printdocument class

Now it prints till the end of the page and the rest is lost

This article has been dead for over six months. Start a new discussion instead.