如何在vb.net中打印Qrcode?

如何在vb.net中打印Qrcode?,vb.net,Vb.net,我制作了一个生成QR码的代码。 现在我试着用热敏纸把它打印出来。但是我怎样才能打印特定尺寸的纸张呢?多谢各位 Private Sub GraphicPrint(ByVal sender As Object, ByVal e As PrintPageEventArgs) Dim x As Integer = 60 Dim y As Integer = 60 Dim width As Integer = 100 Dim height As Integer = 50

我制作了一个生成QR码的代码。 现在我试着用热敏纸把它打印出来。但是我怎样才能打印特定尺寸的纸张呢?多谢各位

Private Sub GraphicPrint(ByVal sender As Object, ByVal e As PrintPageEventArgs)

    Dim x As Integer = 60
    Dim y As Integer = 60
    Dim width As Integer = 100
    Dim height As Integer = 50


    ' e.Graphics.DrawImage(Image.FromFile(GraphicLocation.Text), x, y, width, height, e.Graphics.VisibleClipBounds)
    e.Graphics.DrawImage(Image.FromFile(GraphicLocation.Text), x, y, width, height)
    e.HasMorePages = False
End Sub


Private Sub BeginGraphicPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BeginGraphicPrint.Click
    Try
        AddHandler PrintGraphicControl.PrintPage, AddressOf Me.GraphicPrint
        PrintGraphicControl.Print()
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try
End Sub

试试这样的

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
    Dim g As Graphics = e.Graphics    
    ' Draw image to screen.
    g.DrawImage(Piccode.Image, 0, 0, 100, 100)
End Sub

使用页面设置控件。@DannyJames您认为它在热处理器中工作吗?谢谢you@DannyJames你认为它能在热真空中工作吗?谢谢只要您的dpi设置合理,您扫描它应该没有问题。