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 HTML file format. It can generate a good
In fact, three knowledge points are integrated, including how to access mysql, how to generate xml files, and how to use webservice development.
Okay, let's not talk about it. Stick the Code directly.
Package com. service; import java. io. fileOutputStream; import java. io. IOException; import
"targetproject= "D:\test\xmlParer" >Because it's a simple test, my bean and DAO and XML are all in a unified directory ... D:\test\xmlParerFinally executed on the cmd command lineSwitch directory to D:\test\libJava-jar mybatis-generator-core-1.3. 0.jar-configfile D:\test\generatorconfig.xml-overwrite This is basically OK ... Later, I also studied the main method of Java to execute ... Also OK2012-09-19Toda
Many people ask how to extract files such as Word, Excel, and PDF. Here I will summarize several methods for extracting word and PDF files.
1. Use Jacob.
In fact, Jacob is a bridage, a middleware that connects Java and COM or Win32 functions. Jacob cannot directly Extract files such as Word and Excel. He needs to write the DLL by himself, but it has already been
Original: https://www.cnblogs.com/wangpeng00700/p/8418594.htmlOn the Internet to read some Java generated PDF files, write a little messy, some do not support writing Chinese fonts, some do not support the template, some just put the data inside the generated files, completely regardless of how the data placed and later maintenance, think or summarize a complete version of the tool to export
In recent days, the project needs to generate a PDF report, the online search of Java generated PDF file, there are probably two kinds, one is to use Jacob call Excel Save as PDF file, another is
With the Third-party Open Source Library Itext.jar directly generated
Step one: (the tools involved)Visit: http://www.zhuozhengsoft.com/dowm/, download pageoffice for Java from the official website.Step Two: (Configuration Engineering)1. Unpack the Pageoffice Development Kit, open the "Integrated Files" directory, and copy the Pageoffice4.4.0.2.jar from the "web-inf\lib" directory to your project's "Web-inf\lib" directory2. Refer to the Web. xml file in the "Integrated Files"
Step one: (the tools involved)Visit: http://www.zhuozhengsoft.com/dowm/, download pageoffice for Java from the official website.Step Two: (Configuration Engineering)1. Unpack the Pageoffice Development Kit, open the "Integrated Files" directory, and copy the Pageoffice4.4.0.2.jar from the "web-inf\lib" directory to your project's "Web-inf\lib" directory2. Refer to the Web. xml file in the "Integrated Files"
World
Iii. Chinese problems:
Because itext does not support the East Asian language, we downloadedItextasian. JarLater, you can write Chinese Characters in PDF:
/**
* Asiantest. Java
*/
Import java. Io. fileoutputstream;
Import java. Io. ioexception;
Import com. lowagie. Text .*;
Import com.
When trying to convert a PDF into a string, first use Python's pdfminer and pdfminer3k to try the conversion, and then the data do not understand, then try to use Java,The following is a pdf-to-string function written by Java PDFBox (the main function is not posted, a global function that is used directly) needs to be
1. Use Jacob.
In fact, Jacob is a bridage, a middleware that connects Java and COM or Win32 functions. Jacob cannot directly Extract files such as Word and Excel. He needs to write the DLL by himself, but it has already been written for you, and it is provided by Jacob's author.
Jacob download:
Http://www.matrix.org.cn/down_view.asp? Id = 13
After you download Jacob and put it in the specified path (place DLL in path and JAR file in classpath), you ca
The company made a small optimization: Because some pictures are uploaded separately (more than 10), and then need to print, you need to provide a one-time direct printing, without having to save each picture in the print (the uploader and the print staff is not the same dial), so you want to be able to convert multiple images in a PDF file.A tool class is used here:Overall, it's relatively simple: PackageCom.example.zgz.demo;Importcom.itextpdf.text.D
1. TargetGenerate a table of variable headers in a PDF and populate it with data. Dynamically generated tables are achieved by dynamically acquiring data through a get method that dynamically gets the entity class (which I am the user) through a generic dynamic generation header.Generate a folder every day to store the generated PDF file (the name of the folder is the date timestamp), such as: 20151110The r
Java Xml tutorial (8) Use JDOM to convert Java objects to XML
In the previous tutorial, we learned how to use JDOM to parse and modify the content of an XML file. This section describes how to convert a Java object to
Java Excel and PDF files
The following are some of the things used in development. Some codes are not completely pasted, but the code for operating Excel is pasted:Jxl is a Java Excel tool written by Chinese people. In the Open Source world, there are two sets of influential APIs available: poi and jexcelapi. The function is weaker than that of poi. Howe
read XML.Use the StAX Iterator API to generate an XML fileIn this tutorial, we will learn how to use the StAX API based on the iterator to generate XML.Use the StAX Cursor API to read XML filesThis article describes how to use the StAX Cursor API to read XML data to
The second of the data binding series is how to generate a Java language from the XML data restriction. This article demonstrates how to generate classes and code with complete code, and provides suggestions on how to customize your own version. Haven't you read the first article? The first, "objects, ubiquitous object
Currently, there are many techniques for parsing XML in Java, such as Dom, SAX, JDOM, dom4j, and the advantages and disadvantages of these 4 kinds of parsing XML document technologies are described below.First, define an interface XmlDocument that operates an XML document, which defines the interface for creating and p
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.