Dim fl As String = "c:\data\test.pdf"
Dim doc As New PrintDoc '定义一个报表对象
Dim rm As New prt.RenderImage '定义一个图片对象
For Each f As String In FileSys.GetFiles("C:\Users\Administrator\Desktop\新建文件夹\")
If f Like "*.jpg" Then
rm = New prt.RenderImage '定义一个图片对象
rm.Width = "100%Parent" '设置尺寸为容器(页面)尺寸
rm.Height = "100%Parent"
rm.Image = GetImage(f)
doc.Body.Children.Add(rm) '将图片对象加入报表
End If
Next
doc.SavePDF(fl) '保存为PDF文件
Dim Proc As New Process '打开PDF文件
Proc.File = fl
Proc.Start()