be an absolute path because the current path after Word starts is not the current path when the script is invoked.
#-*-coding:utf-8-*-# Doc2pdf.py:python script to convert doc to PDF with bookmarks! # Requires Office 2007 SP2 # Requires python for Win32 extension import SYS, OS from win32com.client import Dispatch, CO Nstants, Gencache def doc2pdf (input, Output): W = Dispatch ("Word.Application") Try:doc
private static final int wdformatpdf = 17; private static final int xltypepdf = 0; private static final int ppsaveaspdf = 32; private static final int msoTrue =-1; private static final int msofalse = 0; The use of Jacob http://www.oschina.net/code/snippet_128886_43591 is also Call this method directly to public boolean convert2pdf (String inputfile, String pdffile) {string suffix = getfilesufix (inputfile); File File = new file (inputfile), if (!file.exists ()) {System.out.println ("files do no
Because of the contents of some PDF files, we need to re-import them into Word to edit them, but in previous versions word did not have this feature. Now the latest version of Word2013 has improved the PDF editing function, we can open the PDF file directly in the Word2013, then modify and edit, and finally can be saved in a format such as
I haven't found it for a long time, it seems that there are only two ways to solve this problem.
1 COM components that use MS, can only be used on a win server,
2, the use of OpenOffice this I do not know very well, as if to install OpenOffice,
But I'm renting a server where people don't do it.
Reply to discussion (solution)
Http://developer.51cto.com/art/200912/168346.htm
http://stackoverflow.com/questions/5538584/convert-word-do
, *. docx,. xls,. xlsx, ppt,. pptx. Example: F:\\office\\source.doc * @param destfile * target file. Absolute path. Example: F:\\pdf\\dest.pdf * @return Prompt for successful operation. If 1 is returned, the source file cannot be found, or the url.properties configuration error; If 0 is returned, * indicates successful operation; Returns 1, which means the conversion failed/* PUBlic static int Office2pdf (s
Installing Pdftotext to Redhat/rhel/fedora/centos/ubuntuInstall Pdftotext (CentOS) in a different Linux distribution version using the Poppler-utils package:# yum Install Poppler-utilsor use the following command in Debian/ubuntu:$ sudo apt-get install Poppler-utilsPdftotext using syntaxPdftotext {pdf-file} {Text-file}How do I convert a PDF to text?
How do we convert a PDF file to a txt text document in a Mac system? In fact, the Mac system with the Automator application can help us quickly to convert the PDF to txt text, the following small series to bring you a detailed cou
On Mac, install Imagemagic:Download:Http://www.imagemagick.org/script/binary-releases.php#macosxInstallation:Create (or choose) a directory to install the "into" and "Change to" directory, for example:$ CD $HOMENext, extract the contents of the package. For example:$ tar xvzf imagemagick-x86_64-apple-darwin13.2.0.tar.gzSet the MAGICK_HOME environment variable to the path where you extracted the ImageMagick files. For example:$ export Magick_home= "$HO
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.