Create a PDF file dynamically in a Web application

Source: Internet
Author: User
Tags java web adobe acrobat reader

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 need to find a pure Java class library that can produce complex PDF documents in a server-side Web application. Finally, we find that IText (http://www.lowagie.com/iText/) can fully meet our needs.

1.iText Class Library

Itext is an open source pure Java class Library that creates and processes PDF documents. Bruno Lowagie and Paulo Soares led the project. The IText API enables Java developers to programmatically create PDF documents. Itext offers a number of features:

Support for PDF and FDF documents

Various page sizes

Landscape and vertical Layouts

Page margins

Form

Word breaker

Page Header

Footer

Page

Bar code

Font

Color

Document encryption

Jpeg,gif,png and WMF pictures

Ordered and unordered lists

Shadow

Watermarking

Document templates

Itext is an open source library. When writing this article, Itext can be used under two license agreements: Mozilla Public License and LGPL. For more information, refer to the Itext site. In this article, you will see the application of the Itext API. We will explain how to dynamically generate PDF documents using Itext and servlet in server-side applications.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.