asp:review
PDFOne .NET
Lightweight, but Powerful
By Anand Narayanaswamy
Imagine you are in the process of developing a billing
application for a large corporation. There will be a requirement to generate
invoices in PDF format as and when a client successfully completes the payment.
The whole process is to be completed on the server side during run time. Hence,
it is not technically feasible to make use of PDF software to perform the
relevant task. In this scenario, you should employ component libraries that will
be able to create PDF documents with the help of codes.
PDFOne .NET (http://www.gnostice.com/PdfOneNETOverview.asp),
a powerful product developed by India-based Gnostice Technologies, provides a
rich set of Application Programming Interfaces to create and manipulate PDF
documents. I put to the test the preview edition of version 2.0 under Windows XP
Professional SP2 with Visual Studio 2005. The installation process was pretty
easy and I managed to work with the product after going through the step-by-step
instructions given in the getting started guide.
The main feature of the product is its ability to quickly
create, generate, and manipulate PDF documents with only a few lines of code. It
has the built-in functionality to load data from file and memory stream, and can
be used with Windows Forms and ASP.NET applications. Some of the other core
features of the product include compression, encryption, TrueType fonts, font
embedding, support for international characters, and bookmarks. Moreover, the
component ships with a wide range of annotation, such as Text, Link, FreeText,
Line, Square, Circle, Highlight, Underline, Squiggly, StrikeOut, Stamp, and Ink.
The product enables you to design fully formatted PDF
forms with buttons, checkboxes, listboxes, and JavaScript actions.
It is also possible to populate the forms with data from
any data store. I found that the component includes support for advanced drawing
functions, which helps you draw tables and paragraphs with a single method call.
You also can use the product to develop applications that need the functionality
to automatically e-mail the generated PDF file to the client. This feature
should be useful to develop compelling Web applications. A complete list of all
the features included with the product can be viewed at
http://www.gnostice.com/PDFOneNETfeatures.asp.
A form appears inside a PDF form within the browser, and
can be created with only few lines of code:
PDFFormTextField txtFld = new PDFFormTextField();
txtFld.Rectangle = new RectangleF(3, 1, 1.6f, 0.25f);
txtFld.FieldValue = "Enter Name";
txtFld.ToolTip = "Enter Your Name Here";
txtFld.FieldName = "txtName";
txtFld.BorderColor = Color.Black;
txtFld.NameAsUnicode = false;
doc.AddFormField(txtFld);
Listing 1: Creation of TextField.
PDFFormListBox lstBox = new PDFFormListBox();
lstBox.Rectangle = new RectangleF(3, 2, 0.6f, 0.5f);
lstBox.AddItem("India");
lstBox.AddItem("Germany");
lstBox.AddItem("Russia");
lstBox.SelectedItemIndex = 0;
lstBox.FieldName = "lstCountry";
lstBox.NameAsUnicode = false;
lstBox.BorderColor = Color.Black;
doc.AddFormField(lstBox);
Listing 2: Creation of ListBox.
The vendor provides a sample Windows Forms application
that enables you to visualize all the features of the product under a single
project. However, the application is created using Visual Studio .NET 2003
version and I converted it using Visual Studio 2005 to work with it. I would
suggest the vendor provide a sample application that demonstrates the use of the
product in a Web-based environment. However, I found that the vendor has posted
an interesting article on their Web site that examines how to make use of the
product to build ASP.NET applications (http://www.gnostice.com/nl_article.asp?id=125&t=How_To_Generate_PDF_Forms_In_ASP.NET).
The product includes separate documentation for
developers and end-users. The developer guide contains step-by-step tutorials of
each feature, with the help of a sample Windows application. I would suggest the
vendor combine two separate documentation files into a single file with more
tutorials and namespace reference information.
The latest release comes with a PDF viewer and printer
component. While the viewer is a GUI component used to view PDF documents in
Windows applications, the printer component is a set of libraries that enables
developers to write code to print PDF documents. The vendor is slated to release
another release of the product with more features later this year.
I found that the product is pretty lightweight and
contains tons of interesting features.
Rating:
Web Site:
http://www.gnostice.com
Price: US$649
Anand Narayanaswamy, a Microsoft Most Valuable
Professional (MVP) works as an independent consultant based in Trivandrum,
India. Anand also works as chief technical editor for
http://ASPAlliance.com. He is the author of Community Server Quickly
published by Packt Publishing (http://www.packtpub.com/community-server/book).
He runs
http://Learnxpress.com,
http://Dotnetalbum.com,
http://Csharpfaq.com,
http://www.computerbookreviews.org, and
http://www.devreviews.com. Find out more about Anand at
http://www.visualanand.net or e-mail him at
mailto:visualanand@gmail.com.