Group: Awaiting Activation
Posts: 592,
Visits: 3.7K
|
Thank you for all of the suggestions. I tried a number of products and ended up buying Aspose.Words for .Net. It's pricey, when you have multiple programmers, but for high volume mail merges with complex form layouts and minimal programming I think its the best product out there. My requirement was to be able to create and fill in form letters merged with government forms having complex layouts without having to go through the tedious effort of having to re-create the forms in a reporting tool like Sharpshooter, Crystal, etc.. The solution also had to be 100% managed code and produce a single high quality pdf document for printing each merge batch.
I initially started with pdf tools that allowed me to work with the forms in their native format. However as I mentioned in my original post they tended to be very expensive, with convoluted licensing, and many were not managed code but com objects with a .Net wrapper.
After giving up on native pdf tools, the first thing I tried was Active Reports. Their page reports support layers which allowed me to import my forms as an image on one layer and overlay it with my data fields on another layer, no layout programming required. This worked but it doesn't scale. Anything over a couple hundred pages is slow, the output file is huge, and the quality is not that good. You also cannot create multiple page reports in a single document but have to create an individual pdf for each merge record and combine them into a single pdf (I used Essential Objects pdf tool which is reasonably priced and works well). For use cases with low volumes it is a viable solution if you don't need really high quality output. But when you get into the thousands of pages it is just too slow.
The next approach I took was to convert my government pdf forms into Word documents using Acrobat. The conversion usually results in a document that only requires minor tweaking to get it perfect. With the document in docx format I could use MS Office mail merge. But I didn't want to rely on having Office installed on the PC and from what I've read there are potential issues in programmatically managing Office. The two managed code tools I found that could do mail merges using docx files were TX Text Control and Aspose.Words. Text Control is pretty slick and offers an end user Word editor that you can embed in your application to allow users to create/edit Word documents or templates without MS Word. I liked the product, they had lots of examples on their web site and provided great support during my evaluation, but the issues I ran into is that it doesn't support all of the layout formats that Word does (like n-columns before a single column on the same page) and the editor is a little touchy to use. I had a hard time adding lines to forms without messing up the layout.
Aspose.Words is the other product I found for mail merge using Word documents. The product doesn't have an embeddable editor but relies on MS Word for creating/editing Word templates. However is does support all of the format layouts that Word does. Word itself is stable and easy to use to create and edit documents and I don't have any requirement to provide an end user editor in my application. It is relatively simple to program. All I had to do was to implement their data source interface in the business objects I wanted to use as data sources and add a few lines of code to my merge form. It is relatively fast, especially if you merge to docx format. Converting to pdf adds processing time but its not too bad. Acrobat does a decent job in converting my original pdf forms to word so I don't have to spend a lot of time tweaking the form to get accurate results. The resulting output quality is great. One thing that is lacking are events to support progress during processing, however there is a callback used for custom merging that I might be able to use to support this.
The only other thing I needed to do was add barcodes to my documents. TX Control provides a barcode control you can add to the docx file using their editor. Aspose.Words can support merge fields that use barcode fonts. I tried IDAutomations's barcode fonts with their .Net encoding software. It was easy to implement but the barcode was lost in the conversion to pdf. I ended up going with Aspose.Barcode to create barcode images within the merge interface and then merge them into the document. The image is carried over in the conversion to pdf. It required a little more programming but was easy to do once I figured out how it worked. Aspose.Words has a lot of examples on their web site but none of them showed exactly what I wanted to do. You could probably use other .Net tools to create barcode images (IDAutomation has a few) but I decided to keep it simple and go with a single vendor.
-Larry
|