Friday, August 21, 2009

Manipulate PDF in .NET

To convert PDF into image, we have the GFL SDK/GFLAx library as discussed in an earlier post.

Now the problem is how to convert image into PDF, or how to draw onto PDF. One needs to rely on 3rd party module for this function.

PDFSharp (http://www.pdfsharp.net/) works well for this. It can create new PDF file, or draw text and image onto existing PDF files. It even can generate barcode image (but guess it can't do recognization). The current version is 1.3, providing both source and assembly download at sourceforge.net. The source code can be used in one's own application, unless is for commercial purpose and needs support. It is written from scratch in C#. The only limit is that it requires .NET version 2.0 or above. To use this in .NET 1.1 or from other framework such as J2EE/LAMP, I think one can do something like a web service call.

Some people say in web applications PDFSharp cannot run under medium security level. I didn't have this problem, probably because I'm running it on a trusted server, so there is no security restriction.

One last word: it seems that PDF is frequently used in business applications. Now we have these open source projects that allows PDF convertion to and from other formats. Good to have these.

No comments:

Blog Archive

Followers