我需要从几个位图图像创建一个pdf文件。我目前正在使用以下代码:
Dim size As New XSize(0,0)
For k = 0 to theBMPList.Count-1
Dim oPage As New PdfPage()
doc.Pages.Add(oPage)
Dim xgr As XGraphics = XGraphics.FromPdfPage(oPage)
Dim img As XImage = XImage.FromGdiPlusImage(theBMPList(k))
size = new XSize(theBMPList(k).Width, theBMPList(k).Height)
oPage.Height = size.Height
oPage.Width = size.Width
xgr.DrawImage(img, 0,0, size.Width-5, size.Height-5)
Next
这很好但很慢。有更好/更快的方法吗?