文档详情

使用activePDFToolkit如何将TIFF文件转换为PDF.pdf

发布:2017-07-25约2.29千字共3页下载文档
文本预览下载声明
使用activePDF Toolkit如何将TIFF文件转换为PDF 来自慧都控件网 通过代码,activePDF Toolkit除了能实现图片,JPEG的转换,还能将TIFF文件转换为PDF格式 。 示例代码如下: // Copyright (c) 2013 activePDF, Inc. // Example created 01/14/13 // Make sure to add the activePDF product .NET DLL(s) to your application. // .NET DLL(s) are typically found in the products bin folder. class Examples { public void main() { string strPath; int intJPEGToPDF; int intTIFFToPDF; int intImageToPDF; strPath = AppDomain.CurrentDomain.BaseDirectory; // Instantiate Object APToolkitNET.Toolkit oTK = new APToolkitNET.Toolkit(); // Toolkit can directly convert an image to a PDF file 慧都咨询——为您提供贴近企业应用的方案,帮助您获得成功! 1 // If the image is a JPEG file use JPEGToPDF intJPEGToPDF = oTK.JPEGToPDF(strPath + IMG.jpg, strPath + JPEG.pdf); if (intJPEGToPDF 1) { ErrorHandler(JPEGToPDF, intJPEGToPDF); } // If the image file is a TIFF file use TIFFToPDF intTIFFToPDF = oTK.TIFFToPDF(strPath + IMG.tif, strPath + TIFF.pdf); if (intTIFFToPDF != 1) { ErrorHandler(TIFFToPDF, intTIFFToPDF); } // Any supported image file can be converted to PDF with ImageToPDF intImageToPDF = oTK.ImageToPDF(strPath + IMG.jpg, strPath + IMG.pdf); if (intImageToPDF != 1) { ErrorHandler(ImageToPDF, intImageToPDF); } // Release Object oTK = null; // Process Complete 慧都咨询——为您提供贴近企业应用的方案,帮助您获得成功! 2 System.Diagnostics.Debug.WriteLine(Done!); } // Error Handling public static void ErrorHandler(string strMethod, object rtnCode) { Sy
显示全部
相似文档