原創(chuàng)|其它|編輯:郝浩|2012-12-06 13:39:38.000|閱讀 489 次
概述:作為一款功能全面且可無限分發(fā)的文檔圖像處理工具包, GdPicture.NET不僅可實(shí)現(xiàn)文檔生成,打印,也可以實(shí)現(xiàn)某些格式文件的合并。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
作為一款功能全面且可無限分發(fā)的文檔圖像處理工具包, GdPicture.NET不僅可實(shí)現(xiàn)文檔生成,打印,也可以實(shí)現(xiàn)某些格式文件的合并,這里我們將給出一個(gè)使用GdPicture.NET實(shí)現(xiàn)合并多頁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()
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)