ADVERTISER
LINKS
 
activePDF
 
Alexsys
 
Altova
 
Amyuni Technologies
 
Automated QA
 
Axosoft
 
Business Objects
 
Codejock Software
 
ComponentOne
 
Coverity
 
Data Dynamics
 
Developer Express
 
dtSearch
 
Dundas
 
Dynamsoft
 
Hewlett-Packard
 
IBM
 
Imagix
 
Infragistics
 
InstallAware Software
 
InterSystems
 
iWay
 
Kovair
 
LEAD Technologies
 
McObject
 
Microsoft
 
MKS
 
No Magic
 
nsoftware
 
Parasoft
 
Pegasus Imaging Corp
 
Perforce
 
Prezza Technologies
 
Programmer's Paradise
 
Programming Research
 
Rally Software Dev
 
Red Gate Software
 
ScaleOut
 
Seapine
 
Serena
 
Software FX
 
Sparx Systems
 
Swell Software
 
Syncfusion
 
TechExcel
 
Telerik
 
UrbanCode
 
WANdisco
 
Xceed Software
 

 

 
 

 
 

 
 
 

 

 

 
AS OF 7/20/2008 5:39PM EST
Making Your Own PDFs
By Andrew Binstock

January 15, 2007 — Many software packages today have some kind of bundled reporting option. Many of these packages use either a home-brewed solution or they depend on the seemingly ubiquitous Crystal Reports engine. Increasingly, though, users expect that a PDF report can be generated, rather than the usual HTML display or Microsoft Word or Excel-based document.

In the past, these PDF-oriented users would fend for themselves by getting software that would create a virtual printer on their system. Documents “printed” to this device would be rendered as PDF files that the user was then free to save as needed. Adobe’s Acrobat package provides one such solution. Another good option is pdfFactory from FinePrint (www.fineprint.com). There are also some freeware products that offer similar functionality. However, not having tried them, I cannot vouch for them.

But this approach is hardly right for the majority of users, who are unlikely to install a printer driver just because you couldn’t figure out how to provide them with reports in PDF. Fortunately, you have options.

There are several commercial packages, such as the ActivePDF (www.activePDF.com) line of products that do document conversion or generation of PDFs. In their standard configuration, they reside on a server and handle documents either from client systems or generated on the server itself. These products tend to be especially strong in handling PDF-based forms, which are filled in incrementally as various stages of a transaction are executed.

The most flexible solution for PDF creation I have encountered, however, is a free, open-source library called iText (www.lowagie.com/iText). This is a Java library with an extensive API set for controlling all facets of document generation. iText handles even tricky elements with aplomb: multiple columns, embedded images, justification, multiple fonts, including fonts that read from right to left, and so on are all provided for with straightforward API calls.

The most common use of iText is on a Java server, from where it spits out PDFs to the servlet engine, which then delivers it to the user. Frequently, you will code the document using the basic APIs, leaving certain areas blank. Then as you run the report, you fill these areas with data and write them out to the document using iText calls. The library can also output HTML and Microsoft RTF files.

While the iText Web site has remarkably good documentation on it, the best place to get the information you need—especially in the case of using iText in conjunction with JSPs and Web frameworks—is in a newly released book, “iText In Action” from Manning Publications, a publisher of consistently high-quality niche books. This volume is no exception, and it makes a topic that will surely be foreign to many users entirely approachable.

iText is remarkable for its comprehensive feature set. Just about anything you can do in PDF (watermarks, signatures, security, metadata, tagging and so forth) can be done in iText. What surprised me is that iText is unique: To my knowledge, there is no other freeware package with its capabilities, or even a large subset of them. Uniqueness in open source, where almost all projects have several direct, competing counterparts, is comparatively rare. Perhaps due to this, the iText team is just completing a port to the .NET platform. (See itextsharp.sourceforge.net.) It is written in C# and runs on .NET 1.1 or later. The lead on the iText project, Bruno Lowagie, at the University of Ghent, in Belgium, hints that other ports are likely in the future.

My own exposure to iText has come in the context of an open-source project I work with, called Platypus (platypus.pz.org), which is devising a document specification language in the spirit of TeX. The funny name is a loose acronym for Page LAyout and TYPesetting for USers. The “for users” is a key point: It seeks to be far easier to use than TeX or LaTeX. It also will have special capabilities for program code (such as intelligent line breaks for code and the ability to embed numerical symbols for reference in subsequent text). A reporting engine is an additional feature.

The project, in Java, was restarted when iText was discovered. Previously, Platypus was written in C and focused on providing the low-level functionality that iText delivers comprehensively. And so, from this experience, I am intimately aware of how easy iText makes PDF document creation and can recommend it as an excellent solution for your next report project.

Andrew Binstock is the principal analyst at Pacific Data Works. Read his blog at binstock.blogspot.com.







 
 
 
 
 

SUBSCRIBE TODAY

E-Newsletters:
News on Mon/Thurs.
Test & QA Report
EclipseSource
   

   SUBMIT
 
 
 

     CUSTOMER SERVICE
 
   Download Current
   Issue Now!

   Need Back Issues?
    DOWNLOAD HERE

   Moving? Take
   SD Times With You!
 
 
 
EVENTS CALENDAR
 
Dr Dobbs Architecture and Design World
7/21/2008 to 7/24/2008
Chicago
ThinkServices

Open Source Convention
7/21/2008 to 7/25/2008
Portland
O'Reilly Media

Entity Data Management
7/22/2008 to 7/23/2008
New York
FIMA

Black Hat USA
8/2/2008 to 8/7/2008
Las Vegas
TechWeb

Actuate User Conf.
8/4/2008 to 8/6/2008
Las Vegas
Actuate

REGISTER
 



 
SD TIMES 100

It's time once again to
recognize the organizations
or individuals that have
demonstrated leadership in
their markets.


 
GET NOTIFIED

On the latest white papers,
software downloads. Web
seminars and conferences.
 
 


                    


Copyright © 1999-2008 BZ Media LLC, all rights reserved. Privacy and Legal

Phone: +1 (631) 421-4158 • E-mail: info@bzmedia.com