Directory
Baidu Library solution (I)-Overall Thinking
Baidu Library solution (2) -- use Jacob to call MS Office to convert the document to PDF
Baidu Library solution (3) -- use JCom to call MS Office or Acrobat API to convert the document to PDF
Similar to Baidu Library solution (4) -- use JODConverter to call OpenOffice.org to convert the document to
Directory
Baidu Library solution (I)-Overall Thinking
Baidu Library solution (2) -- use Jacob to call MS Office to convert the document to PDF
Baidu Library solution (3) -- use JCom to call MS Office or Acrobat API to convert the document to PDF
Similar to Baidu Library solution (4) -- use JODConverter to call OpenOffice.org to convert the document to
We know that not only can we save images and text in a PDF file, but we can also create a form in a PDF file. For example, figure 1 below is a PDF file in which some forms are created.In fact, the PDF file is a special structure of the file, then, if we need to go through the PDFBox
CodeUsing system;using system.io;using Word;namespace wpstopdf{class wps2pdf:idisposable {dynamic wps; Public Wps2pdf () {Here to create a WPS instance do not know what to use the Sao operation is not reported to miss the local installation is wps2016 Type type = Type.gettypefromprogid ("kwps.application"); NBS P wps = activator.createinstance (type); } public void to PDF (String wpsfilename, string pdffilename = null) { I F (w
Directory
Baidu Library solution (I)-Overall Thinking
Baidu Library solution (2) -- use Jacob to call MS Office to convert the document to PDF
Baidu Library solution (3) -- use jcom to call MS Office or Acrobat API to convert the document to PDF
Similar to Baidu Library solution (4) -- use jodconverter to call OpenOffice.org to convert the document to
WPS API, that is, COM, mainly divided into V8 and V9 two versions, the online easy to find examples, are V8. Now the official online can download, 2013 Rob Fresh version, is V9 API.Python calls com to install Python for Windows Extensions, which is Pywin32The call is simple, the direct code:ImportSYSImportOSImportWin32com.clientstat= Os.system ('taskkill/im Wps.exe') argc=Len (SYS.ARGV)Print("Number of arguments:", ARGC,'arguments.')Print('Argument Li
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
WPS API, that is, COM, mainly divided into V8 and V9 two versions, the online easy to find examples, are V8. Now the official online can download, 2013 Rob Fresh version, is V9 API, the following code is based on V9.Python calls com to install Python for Windows Extensions, which is Pywin32The call is simple, the direct code:ImportSYSImportOSImportWIN32COM.CLIENTARGC=Len (SYS.ARGV)Print("Number of arguments
[Python] Call the WPS V9 API to convert PPT to PDF and pythonwps.
WPS APIs, that is, COM, are mainly divided into V8 and V9 versions. examples that are easy to find on the Internet are V8. You can download the V9 API on the official website.
Python needs to install Python for Windows Extensions to call COM, that is, pywin32.
The call is simple. The Code is as
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.