With Tables("fa piao")
Dim rs As List(of Row) = .GetCheckedRows
If rs.Count > 0 Then
Dim Result As DialogResult
Result = MessageBox.Show("确定打印吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
Dim doc As New PrintDoc '定义一个报表
doc.PageSetting.PaperKind = 9
doc.PageSetting.Landscape = True
Doc.PageSetting.LeftMargin = 20 '设置左边距
Doc.PageSetting.RightMargin = 20 '设置右边距
Doc.PageSetting.TopMargin = 10 '设置上边距
Doc.PageSetting.BottomMargin = 10 '设置下边距
Dim rm As prt.RenderImage '定义一个图片对象
For Each i As Row In rs
If i("fa piao") IsNot Nothing Then
Dim fil As String = i("fa piao")
Dim fi As String() = fil.Split(vbcrlf)
Dim file As String
For Each ff As String In fi
file = "\\10.100.100.129\产品中心\foxtable资料\fa piao\" & ff
Dim img As image = getImage(file)
If img IsNot Nothing Then
rm = new prt.RenderImage
rm.Image = img '请改为实际的图标名称和路径
rm.Width = "Parent.Width" '宽度等于页面宽度
rm.Height = "Auto" '高度由图片大小自动决定
'rm.Style.ImageAlign.StretchHorz = False '禁止图片水平拉伸
rm.Style.ImageAlign.AlignHorz = prt.ImageAlignHorzEnum.Center '居中显示
rm.BreakBefore = prt.BreakEnum.Page
doc.Body.Children.Add(rm) '将表格对象加入到报表中
'Doc.Preview()
'Doc.PrinterName = "HP LaserJet 6L"
End If
Next
End If
Next
doc.Print()
End If
End If
End With