0

I use a code to print a libel with all its contents and move to the next page but the problem

1 - Printing breaks the base of the first page when moving to the next page I want to have a vacuum at the end of the page 1

Print completes the next page but prints at the bottom of the page rather than the top of the page

The image appears inside the lable and is contained and does not appear below the lable when printing

        Static Lines() As String = Label1.Text.Split(vbCrLf)
        Static Font As New Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Pixel)
        Static I As Integer
        Dim bmp As System.Drawing.Bitmap
        bmp = PictureBox1.Image
        Dim VerticalPos As Integer = 1000
        Do
            e.Graphics.DrawString(Lines(I), Font, Brushes.Black, 200, VerticalPos)
            I += 1
            VerticalPos += Font.Height
            e.Graphics.DrawImage(bmp, 200, VerticalPos + 100)
            If VerticalPos > e.PageBounds.Bottom Then
                e.Graphics.DrawImage(bmp, 200, VerticalPos)
                e.HasMorePages = True
                Return
            End If
        Loop Until I = Lines.Length
    End Sub
2
Contributors
1
Reply
20
Views
1 Month
Discussion Span
Last Post by rproffitt
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.