开发者

What software do you use for letter templating and printing? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 6 years ago.

开发者_运维问答 Improve this question

In our LOB application there is a very important use case of printing letters, which are then printed and posted out from a mail house (thousands per day). The current situation is that the letter templates are created in Word 97 and fields are mail merged from values in database using a VB.Net application that basically uses word automation. But depending on Word 97 is not a good idea today. We only have a couple of PCs that have Word 97 installed as rest of the company has moved to Office 2007.

What software or technology (compatible with .Net) is available today that best suits this scenario. Is it better to do the same thing but move to Word 2007 or PDF or something else. Price may not be a factor. The important thing is that the letter templates must be designed by business users and data to fill placeholders come from DB.

A bonus would be to import the hundreds of existing Word 97 letter templates without rewriting them from scratch.


Xpertdoc takes Word documents and run (merge) them efficiently server side, on premise or from the cloud, for interactive and batch letter generation. CGU, a large insurance group, uses this for generating, auditing, printing and mailing hundreds of letter per day. Here's what they have to say about it: http://www.youtube.com/watch?v=xbqWiFt5dUA&feature=channel&list=UL Symetra Life Insurance integrated it with their customer relationship management (Dynamics CRM), integrating 450 letter templates in 3 weeks.


My organisation is also looking to tackle a problem similar to this and I can share with you some of the things I've found. We're not doing it yet, still in the design stage so take the following with that in mind.

Your situation also depends on the required format at the mailing house - at the moment they must be accepting Word 97 documents, could they also accept XML, DOCX, PDF or something else?

There's a commercial product called Intelledox that lets you use Word 2003 (possibly as early as Word 2000?) as a template designer and then assemble documents from data sources which can be databases, web services etc. Looks like a pretty interesting product, depends on your budget though. This would probably rate highly on your criteria for end user template design.

You could look at the Open XML SDK which allows you to generate DOCX (Word 2007) files programmatically. Your business users would generate a template in Word and supply it to a developer who would then likely create an XSLT. This XSLT is then used at run time to programmatically replace the contents of the base Word document template. This doesn't require Word on the server, just the .NET DLLs that are part of the SDK. Downside to this is it requires a bit of developer processing each time a new template is generated.

I've also considered the reporting approach too - we use SQL Server Reporting Services and that could be used to generate the merged document. It supports Word, Excel, PDF and other export formats. The downside to this is that it also usually requires a developer to design the report. You could deploy the SQL Server Reporting Services Report Builder which is intended for power users to generate their own reports. If you consider this approach make sure it's SQL Server 2008 (Report Builder 2.0), apparently Report Builder v1.0 is pretty poor.

If the mailing house accepts XML you could supply the mailing house with an XSLT file and just send the data, rather than the assembled document. Not sure if the print house you use accepts that, or if you need to keep a copy of the completed document internally for auditing purposes.

Lastly it might be worth a look at the XPS format. Not sure how the templates for this would be design, it might be programming-heavy too.

Hope this helps with your thinking anyway!


Doesn't the office 2007 SDK deal with this sort of situation out of the box?

Alternatively you could look at sidestepping office and using wpf directly, with a commercial Rich text editor.


Well, for all kinds of reporting I used Crystal Reports, which allows you to easily retrieve information from database and fill in the form. You may use PDF or HTML format for that.


My company has just recently dealt with this issue and we were using even more recent word 2003.

Firstly the use of Office products in a server style environment is not supported by microsoft and my experience will cause you alot of pain. Does the Vb.net application run on a client machine where a user can interact with the program or on a central server (you mentioned dedicated machines)

But this does not mean you cannot use office to create the templates. The office file (.docx) is a zip/compresseed xml file, which can be processed by text manipulation.

assuming the process is server based or not monitored, I would recommend a) upgrade all your templates to office files (.docx). b) use the office 2007 to maintain the templates c) either write or find a program that can take the (.docx) files, unzip them, and replace the merge fields. NOte this answer depends on the complexity of your templates. There are many programs that can deal with text replacement etc. d) run a program that can convert docx to pdf. Assuming the document does not require subsequent modification. finding a docx to pdf is possible.

are your templates simple? or do you have nested data, conditional formatting in the document and other such complexities?


We built something very similar at my company a few months ago. We used a library called DocIO by Syncfusion. The users create normal documents using MS Word (2003 or 2007) with standard Mail-Merge fields in them. These documents are then uploaded and stored in the application's database. We then use the DocIO library to do a mail-merge, passing in a DataTable of values to merge on:

byte[] templateDocument = . . .
DataTable data = . . .
Stream templateDocStream = new MemoryStream(templateDocument);
mailmergeDoc = new DocIO.WordDocument(templateDocStream);
mailmergeDoc.MailMerge.Execute(data);

We can then send the document down to the browser like this

Response.AddHeader("Content-Disposition", "attachment; filename=merged.doc");
doc.Save(Response.OutputStream, Syncfusion.DocIO.FormatType.Doc);
Response.End();


Depending on the complexity of your letters layout, WPF might be a good option.

It's part of the .NET framework so you don't have to rely on any third party library's or apps which may not be updated the future. Which hopefully avoid a repeat of the issues you have with Office 97.

I know you've said price isn't an issue, but it is also free.


Microsoft ReportViewer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜