原創|其它|編輯:郝浩|2012-12-14 10:51:48.000|閱讀 438 次
概述:本文將以將單頁或多頁TIFF文件轉換成PDF格式為例,繼續介紹GdPicture.NET的強大圖形處理功能。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
GdPicture.NET作為知名的圖形處理控件,在圖像掃描之后的導出轉換為PDF格式時的表現尤為出色,本文將以將單頁或多頁TIFF文件轉換成PDF格式為例,繼續介紹GdPicture.NET的強大圖形處理功能。
代碼示例如下:
Dim oGdPictureImaging As New GdPicture.GdPictureImaging Dim imageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("C:\MyTiff.TIF") If imageID <> 0 Then Dim oGdPicturePDF As New GdPicturePDF oGdPicturePDF.NewPDF(True) ' set False to create non PDF/A oGdPicturePDF.AddImageFromGdPictureImage(imageID, False, True) 'Adds the first page If oGdPictureImaging.TiffGetPageCount(imageID) > 1 Then For i As Integer = 2 To oGdPictureImaging.TiffGetPageCount(imageID)'Adds other pages, if any oGdPictureImaging.TiffSelectPage(imageID, i) oGdPicturePDF.AddImageFromGdPictureImage(imageID, False, True) Next End If oGdPictureImaging.ReleaseGdPictureImage(imageID) oGdPicturePDF.SaveToFile("c:\mypdf.pdf") oGdPicturePDF.CloseDocument() End If
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網