Programmatic generation of PDF reporting, downloading, converting and mailing to end-users using APIs

The Continuous Improvement/Business Systems Administration team at Lion Nathan is responsible for ensuring data integrity, compliance to key processes and visibility of information relating to several core systems. These include the ERP (Enterprise Resource Planning) system, the web-based procurement system, and others.

A range of products are used internally to effect regular scheduled processing, regular data ‘logic checks’ and other tasks. In some cases these solutions are VBA/Excel based solutions, and in others they are ASP.NET/SQL Server 2008 based tools delivered via the intranet.

Previously we have employed a range of methods to interoperate with Microsoft Office files, and also to generate PDF reports and emails to users. These included VBA/Redemption, custom .NET code, and ‘single purpose’ third party .NET components.

Requirements Scenario

The types of tasks typically encountered, and for which Aspose.Total for .NET was selected, included:

  • Programmatic generation of PDF reporting to end-users, to be pushed to users via emails.
  • Provision of ‘download this report’ functions within ASP.NET applications, in PDF or Microsoft Excel formats
  • Data processing applications, for example, taking batches of Excel files and converting each sheet to .CSV or other custom formats.
  • Bulk generation and dispatch of warning emails to users who have tasks pending.

Solution Implementation

The Aspose solution first became known to us when we were looking to interoperate with Microsoft Excel files. While it is possible to do this using native .NET code, it was unwieldy and the maintenance overhead far outweighs the cost of purchasing a component to do it.

Implementing the solution was easy; typically large blocks of custom code were replaced with a handful of calls to the Aspose components. Speed of execution went up significantly, and the number of exceptions/issues to investigate went down to virtually zero.

Benefits Gained by Switching to Aspose

Effectively the Aspose.Total for .NET suite is the ‘Swiss army knife’ of components we use. Sitting alongside presentation layer components, it forms the ‘glue’ to pull and push datafiles in the desired format. If a third party requires data in a certain format, it can be agreed to in the knowledge that implementing the export or import routines will be an exercise counted in minutes or hours, rather than potentially days or weeks.

Reduction of maintenance is a great step forward – as new Excel formats appear, and complexities multiply, these components form a great ‘layer of abstraction’ so the details of what files you are using don’t matter.

The support provided by Aspose has been quite incredible thus far. For example several weeks ago, we found a bug where the Excel ‘CSV’ export was acting slightly differently to the way the Aspose components did it. Having reported this on the forum as an urgent issue, the developers produced me a custom build of the component, on the weekend, with the issue resolved! Frankly I was amazed, when I’ve normally been in the situation with vendors where they say the issue is ‘acknowledged’ without any timeline or chance of quick resolution. Then, last week, I received an email indicating my fix had been rolled into the last production release. Amazing service! This hasn’t been the only example – in cases where I have had issues getting something to work as I hoped, the support staff are happy to produce sample code and discuss the best approach to resolve issues.

Future Implementations

Now that a ‘library’ of our most common usages of the Aspose components is around, we look to ensure it is the tool of choice for any data conversion/file generation type applications. Buttons to export files in the selected format are de riguer in any new applications we create.

Conclusion

So far, we’ve found the Aspose suite to be a robust, performant and well supported set of components and if you have any more than trivial file management requirements in your applications they are well worth the investment.

Screenshots

Figure 1: Reporting interface with PDF Export feature driven by Aspose PDF.

Figure 2/3: Report driven from Excel and rendered to PDF

Download this success story in PDF format.