How to: Convert Office (Word, Excel, and PPT) files to PDF files via the WPS * API
1. Description
Pdffile is a portable file format that is created by theAdobeUnique cross-platform file format developed by the company. PDFfile toPostScriptbased on the language image model, precise color and accurate printing can be guaranteed on any printer, i.e.PDFfaithfully reproduces every single character, color, and image of the manuscript. Portable Document format, also known as"Portable Document Format", is an electronic file format. This file format is independent of the operating system platform, i.e.,PDFfiles, whether inWindows,Unixor the Apple Company'sMac OSThe operating system is generic. This feature makes it aInternetthe ideal document format for electronic document distribution and digital information dissemination. An increasing number of e-books, product descriptions, corporate announcements, web materials, e-mails are beginning to be usedPDFformat file.
WillOfficeFile TransferPDF,Office 2003not supported,Officeand later, Microsoft offers conversion tools and operations. You can also use a virtual machine toOfficeFile Print OutputPDFfiles, or you can useWPSsave directly asPDFfile. But relatively do information management systems (ERP,CRM,OAetc.), the company always wants to implement the file conversion function directly in the system. Below I will show you how to useWPS APIwill beOfficeconverted toPDFfile.
2. InstallationWPSto configure
I used the WPS 2013 Person edition, the front garden has mentioned the use of wps to PDF function, but I use his source code call implementation can not be successfully converted, may api WPS 2013 API  office file to pdf,wps version: 9.1.0.4883 OFFICE  will include word , excel and ppt Span style= "font-family: the song Body;" > three commonly used file formats.
After WPS is installed correctly, you want to implement the API to office file feature, you need tool configuration: WPS Configuration Tool-Advanced configuration, use WPS compatible Office version.
Click Advanced
3. WinformSample Program
The Winform program sample is developed using VS2008 C # . After you add a project, you need to reference the WPS related components.
Etapi.dll corresponding to the Excel file Api;wppapi corresponding to the ppt file Api;wpsapi.dll corresponding to the Word file API. These files are typically found in the installation directory or in the way that COM components are referenced.
4. File Conversion
after project creation is correctly added, the following is the implementation of Office file conversion functionality. Conversion steps are generally divided into: Create a related program instance -"open Office file -" Export PDF file - "Closes the program instance.
4.1. WordFile TransferPDFfile
4.2. ExcelFile TransferPDFfile
4.3. PPTFile TransferPDFfile
I am computer Windows XP, install Office 2003 and WPS 2013 Person Edition, test can convert files normally, if you have the corresponding function, this article can be used for reference. WPS 2013 Conversion file parameters, at present Jinshan company does not provide relevant development documentation, they recommend developers see the MS Office development documentation implementation.
How to transfer Office (Word, Excel, and PPT) files to PDF files via the WPS/API