("Word.Application");Sets Word not to be visible. Otherwise the word interface will pop upApp.setproperty ("Visible", false);Get all open documents in Word, return to documents objectDispatch docs = app.getproperty ("Documents"). Todispatch ();The Open method in the call Documents object opens the document. and returns an open Document objectDispatch doc = Dispatch.call (docs,"Open",Inputfile,FalseTrue). Todispatch ();Invokes the SaveAs method of the Document object. Save a document in
Java calls openoffice to convert office documents to PDF. openofficepdf
Leading:
During the release process, we often use java to convert office documents to PDF files. Generally, Microsoft openoffice + jodconverter is used to
Java implements conversion from Html to PDF, and javahtmlpdf
The customer of the Project puts forward a requirement to export form data in the government affairs process to pdf or image format for electronic archival materials. Forms are implemented based on the company's e-government construction platform, and are sav
The customer on the project presents a requirement to export form data from the government process to PDF or image format for use as an electronic archival material. The form is based on the company's e-government building platform, and the database is saved in HTML format, so you plan to convert the form HTML directly
Java uses wkhtmltox to generate PDF documents or images using HTML code. wkhtmltoxpdf
Convert HTML code to PDF or image for saving as required by the project. At first, Flying Saucer was used to generate
stability of the converted documents.
Each Java application has a Runtime class instance, enabling the application to be connected to the running environment. Applications cannot create their own Runtime instances. You can use the getRuntime method of the Runtime class to obtain the current Runtime. After obtaining the Runtime class instance, you can call the exec method of the class to create a new process to execute the specified string command. Th
There are several ways to convert HTML files into PDF files on the Internet, but some have strict requirements on the HTML file format. If you are a little wrong, you cannot generate the PDF file we want. Here I recommend onePd4ml, which can solve the problem of incorrect
1. Required jar Package: Org.xhtmlrenderer.flying-saucer-pdf-itext5,itext.itext,maven depends on the following:1 2 3 4 5 6 7 8 9 2. Chinese SupportBecause Chinese is present in the HTML code, we need to add Chinese support and need to add the required font files to the Project.3. Convert PDF Main code1 /**2 *
Java implementation of HTML to PDF of several methods-mainly to solve the problem of Chinese garbledFirst: Colleagues in the HTML to PDF encountered garbled problem*****************************************************************She uses the Itext method to implement
(Xhr.responsetext); if (back.success = = True) {Alertbox ({content: ' PDF exported successfully!)
', lock:true,drag:false,ok:true}); }else{Alertbox ({content: ' PDF export failed!)
', lock:true,drag:false,ok:true});
}
}
}
};
}
});
Converts a picture URL data with base64 to a BLOB function Convertbase64urltoblob (urldata) {Remove the header of the
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 OpenOffi
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 OpenOffi
The example in this article describes the Java implementation of HTML-pdf-conversion methods. Share to everyone for your reference. as follows:
Package test;
Import Java.io.File;
Import Java.io.FileOutputStream;
Import Java.io.OutputStream;
Import Org.xhtmlrenderer.pdf.ITextFontResolver;
Import Org.xhtmlrenderer.pdf.ITextRenderer;
Import Com.lowagie.text.pd
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.