我想在第二页打印第二行请帮帮我 [英] I want to print second row in second page please help me
本文介绍了我想在第二页打印第二行请帮帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
For Inti = 0 To Tbl.Rows.Count - 1
Dim _ImageRectF As New RectangleF
_ImageRectF.Width = 100
_ImageRectF.Height = 30
_ImageRectF.X = Tbl(Inti)("ImageLeft")
_ImageRectF.Y = Tbl(Inti)("ImageTop")
Dim stream As New System.IO.MemoryStream()
Dim _image As Byte() = DirectCast(Tbl(Inti)("ImageToPrint"), Byte())
stream.Write(_image, 0, _image.Length)
Dim bitmap As New Bitmap(stream)
e.Graphics.DrawImage(bitmap, _ImageRectF)
Dim L1Font As New Font("Arrial Narrow", 8, FontStyle.Regular)
Dim L2Font As New Font("Arrial Narrow", 8, FontStyle.Regular)
Dim L3Font As New Font("Arrial Narrow", 10, FontStyle.Regular)
e.Graphics.DrawString(Tbl(Inti)("Line1") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line1Left") & ""), Val(Tbl(Inti)("Line1Top") & ""))
e.Graphics.DrawString(Tbl(Inti)("Line2") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line2Left") & ""), Val(Tbl(Inti)("Line2Top") & ""))
e.Graphics.DrawString(Tbl(Inti)("Line3") & "", L3Font, Brushes.Black, Val(Tbl(Inti)("Line3Left") & ""), Val(Tbl(Inti)("Line3Top") & ""))
'Increase current char count
curChar += chars
If Inti = Tbl.Rows.Count - 1 Then
e.HasMorePages = True
Else
e.HasMorePages = False
End If
Next
我的尝试:
What I have tried:
For Inti = 0 To Tbl.Rows.Count - 1
Dim _ImageRectF As New RectangleF
_ImageRectF.Width = 100
_ImageRectF.Height = 30
_ImageRectF.X = Tbl(Inti)("ImageLeft")
_ImageRectF.Y = Tbl(Inti)("ImageTop")
Dim stream As New System.IO.MemoryStream()
Dim _image As Byte() = DirectCast(Tbl(Inti)("ImageToPrint"), Byte())
stream.Write(_image, 0, _image.Length)
Dim bitmap As New Bitmap(stream)
e.Graphics.DrawImage(bitmap, _ImageRectF)
Dim L1Font As New Font("Arrial Narrow", 8, FontStyle.Regular)
Dim L2Font As New Font("Arrial Narrow", 8, FontStyle.Regular)
Dim L3Font As New Font("Arrial Narrow", 10, FontStyle.Regular)
e.Graphics.DrawString(Tbl(Inti)("Line1") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line1Left") & ""), Val(Tbl(Inti)("Line1Top") & ""))
e.Graphics.DrawString(Tbl(Inti)("Line2") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line2Left") & ""), Val(Tbl(Inti)("Line2Top") & ""))
e.Graphics.DrawString(Tbl(Inti)("Line3") & "", L3Font, Brushes.Black, Val(Tbl(Inti)("Line3Left") & ""), Val(Tbl(Inti)("Line3Top") & ""))
'Increase current char count
curChar += chars
If Inti = Tbl.Rows.Count - 1 Then
e.HasMorePages = True
Else
e.HasMorePages = False
End If
Next
推荐答案
查看此
如何在C#(printdocument)中打印更多页面 [ ^ ]
这篇关于我想在第二页打印第二行请帮帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文