原創|其它|編輯:郝浩|2012-12-06 13:39:38.000|閱讀 489 次
概述:作為一款功能全面且可無限分發的文檔圖像處理工具包, GdPicture.NET不僅可實現文檔生成,打印,也可以實現某些格式文件的合并。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
作為一款功能全面且可無限分發的文檔圖像處理工具包, GdPicture.NET不僅可實現文檔生成,打印,也可以實現某些格式文件的合并,這里我們將給出一個使用GdPicture.NET實現合并多頁TIFF文件的示例。
Dim fs1 As New FileStream("c:\multipage1.tif", FileMode.Open) Dim fs2 As New FileStream("c:\multipage2.tif", FileMode.Open) Dim fs3 As New FileStream("c:\output.tif", FileMode.CreateNew) Using oGdPictureImaging As New GdPictureImaging Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromStream(fs1) Dim tiffID As Integer 'Adding first multipage For i As Integer = 1 To oGdPictureImaging.TiffGetPageCount(ImageID) oGdPictureImaging.TiffSelectPage(ImageID, i) If i = 1 Then tiffID = oGdPictureImaging.TiffCreateMultiPageFromGdPictureImage(ImageID) Else oGdPictureImaging.TiffAppendPageFromGdPictureImage(tiffID, ImageID) End If Next oGdPictureImaging.ReleaseGdPictureImage(ImageID) ImageID = oGdPictureImaging.CreateGdPictureImageFromStream(fs2) 'Adding second multipage For i As Integer = 1 To oGdPictureImaging.TiffGetPageCount(ImageID) oGdPictureImaging.TiffSelectPage(ImageID, i) oGdPictureImaging.TiffAppendPageFromGdPictureImage(tiffID, ImageID) Next oGdPictureImaging.ReleaseGdPictureImage(ImageID) 'saving multipage to stream oGdPictureImaging.SaveAsStream(tiffID, fs3, DocumentFormat.DocumentFormatTIFF, 65536) oGdPictureImaging.ReleaseGdPictureImage(tiffID) End Using fs1.Dispose() fs2.Dispose() fs3.Dispose()
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網