In a recent logistics project, the customer asked us to build a Web site that allows users to query shipping information from a legacy system, with three major requirements:
1. Shipping information must be returned in the format of PDF document;
2.PDF file must be able to download through the browser;
3.PDF files must be readable by Adobe Acrobat Reader;
Although our team has a lot of Java Web application development experience, but in the PDF document processing is not much experience. We n
Now the use of PDF documents has become more and more common, it is in the document compression, security and so on, the performance is very good, about its benefits I do not say here more. So how do you use the Java language Development application to output documents in PDF format? Here to introduce Itext, it is a source code development project, you can use itext easy to achieve the output of the PDF. In
First, the preface
In the Enterprise Information System, report processing has always been a relatively important role, this article will introduce a PDF report to generate a Java component--itext. By using JSP or JavaBean to generate PDF reports on the server side, the client uses hyperlinks to display or download the generated report, which solves the problem of the B/s system's report processing.
Ii. introduction of
Author Profile:Michael yuan, technical expert, JBossSeam: simplicity and power beyond Java EE, lightweight Java WebAuthor of application development and other books, software consultant, currently working on JBoss.
Abstract:This article describes how JBoss Seam integrates business processes, uses itext and task scheduling, and summarizes the key elements in the seam programming model.
This article is the last part of "JBoss Seam: A deep integration fr
template. Its disadvantage is that template generation is complex, there are many rules, need to use the IDE's visual tools for editing, getting started and use is difficult.
2.itext
Itext is a very useful PDF open source software. Supports the use of pictures, HTML pages, and direct production of PDFs in a variety of ways, such as Java code. The Itext API is ri
and building the bookmark's data structure, which is based on sax parsing, and with the help of stack. The XML file is saved with Dom.
(4) Swing application, H2p-tool editing features swing, showing and editing the tree structure with JTree
(5) C # components, generate a single PDF based on the URL, with C # components, and on the Vs.net development platform for a simple development. The h2p file provided by Javaei usually contains dozens of URLs, it takes a bit of time to generate PDFs for e
Environment configuration
1 Installing the Java JDK correctly
2 Put ireport in the C:/ireport.
3 Put Ant in C:/ant (I'm using Bea's ant path is d:/bea/weblogic81/server/ant)
4 put Jasperreports-1.2.0.jar into the current classpath (no Plus, I'm using ireport/lib already exists)
5 Place Itext-1.3.1.jar into C:/ireport/lib (no plus, I'm using ireport/lib already exists)
6 Modify Ireport/ireport.bat file, add the following content
Set java_home=c:/j2sdk1
Installation and Use of iReport4.5.1 fonts and handling of pdf Fonts
To use additional fonts, you must add a font file. This article applies:
1.pdf Chinese Garbled text, pdf Chinese not displayed
2. Use the new font file and install it in jasper
3. Solve exceptions caused by the latest jar files and the jar packages of iText of different versions
For pdf Processing, we use open-source iText.
The procedure
pinned November 06, 2017 14:41:04 Hits: 2311These days, the task has a difficulty is to automatically generate a print page PDF document, and upload to the server, but the company framework only manually upload documents, printing can be saved as a PDF local bar, so feel very headache, just start without direction, so only surf the internet, Online read a lot of information, gradually from a little direction also do not understand, to slowly begin to understand how to do, nonsense will not say,I
Environment Configuration
1. Correctly install and configure the Java JDK
2 put ireport in C:/ireport
3. Put ant in C:/ant (the ant path of Bea is D:/BEA/weblogic81/Server/ant)
4 place the jasperreports-1.2.0.jar in the current classpath (not added, I used ireport/lib already exists)
5 place the itext-1.3.1.jar to C:/ireport/lib (not added, I used ireport/lib already exists)
6. Modify the ireport/ireport. BAT file and add the following content:
Set ja
more than described.In a comprehensive, a complete online document browsing program.
Attach: Use itext to convert JPG, JPEG, PNG to PDF Other, use Itext to convert jpg/jpeg/png to PDF Itext is a well-known open source site SourceForge a project that is used to generate a PDF document of a Java class library. Not only can you generate PDF or RTF documents
. Net framework does not contain methods that can be used with pdf files. So when you need your ASP. when a. Net Web application contains a part that is created or interacts with a PDF file, you have to find available third-party components. you can use Google to search for charged components within your budget. Of course, there are also some open-source components. One of them is iTextSharp, which is the. Net version of the famous JAVA tool iText.
H
[Translation] creating PDF-iTextSharp in ASP. NET,
. Net framework does not contain methods that can be used with pdf files. So when you need your ASP. when a. Net Web application contains a part that is created or interacts with a PDF file, you have to find available third-party components. you can use Google to search for charged components within your budget. Of course, there are also some open-source components. One of them is iTextSharp, which is the. Net version of the famous JAVA tool
Original address: http://www.cnblogs.com/Creator/archive/2010/03/13/1685020.htmlC # Reference itext create PDF documentRefer to Itext to download components from hereFive steps to create a PDF in the following illustrationFirst step: Create an instance of a file objectDocument mydocument= New Document (PageSize.A4.Rotate ());Step Two: Create a writer listener file and write the desired stream to the filePdf
. generate an EXCEL document directly on the client
4. Generate a PDF file directly on the client
Download the JAR package: the following code passes the test in JDK1.4 RESIN2.16
ITEXT pack http://mesh.dl.sourceforge.net/sourceforge/itext/itext-1.3.5.jarCharacter bag http://itext.sourceforge.net/downloads/iTextAsian.jar
JSP is generated on the client IE side and
Http://feifei.im/archives/93——————————————————————————————————————————————The project to use the function of doc to PDF, some Google summed up three ways (free program), so one after another to try to do a summary record, the next time to use direct check, save the forgotten ...Method 1.poi Read Doc + itext generate PDF (most convenient, worst-performing, cross-platform)Method 2.jodconverter + OpenOffice (general format implementation of the effect is
4 Generate PDF documents directly on client side
Need to download JAR package: The following code is tested under JDK1.4 RESIN2.16
Itext Bag Http://mesh.dl.sourceforge.net/sourceforge/itext/itext-1.3.5.jarFont Pack Http://itext.sourceforge.net/downloads/iTextAsian.jar
JSP generated to the client IE side directly open
IE_PDF.JSP:
N
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.