我的可变文档是一个列表(byte())。我有一个有两页的tiff图像,但我只能保存第一页。如何将所有页面作为一个文件返回?
Dim tiffByte = convertToTiff(documents)
Response.Clear()
Response.ContentType = "image/tiff"
Response.AppendHeader("Content-Disposition", "attachment; filename=theFile.tiff")
Response.OutputStream.Write(tiffByte, 0, tiffByte.Length)
Response.Flush()
Response.Close()
Private Function convertToTiff(ByRef images As List(Of Byte())) As Byte()
Dim tiffByte As Byte()
tiffByte = images.SelectMany(Function(bytes) bytes).ToArray()
Return tiffByte
End Function