Summary

In this chapter, you’ve learned how to extend Flex components to give them PDF generation capabilities. We encourage you to experiment in this area so you can be in full control of your own set of printable controls that reflect all printing needs of your enterprise. On the other hand, we offer you our version of such components, which are included in Clear Toolkit components—ready to use.

The principle of PDF generation on the client described in this chapter has several advantages:

  • You don’t have to create separate templates for further merging with data—everything is happening at the component level.

  • Pagination of the long documents is also taken care of by the client-side code.

  • Produced documents are fully searchable.

  • If you sent editable components from Flex (e.g., a DataGrid), they will remain editable in the PDF document, too.

All source code for the examples used in this chapter is located under the Flex Builder projects air.offline.demo.print, air.offline.demo.web.print, PrintingSamples, and clientPdfAir. We’ve also included for your convenience the source code of the package com.farata.printing, which is a part of clear.swc. But to get the up-to-date version of the code of all components included in this library, visit the SourceForge repository of the Clear Toolkit framework at https://sourceforge.net/projects/cleartoolkit/.

Wouldn’t you agree that with our smart Flex components, the task of printing becomes almost trivial?

Get Agile Enterprise Application Development with Flex now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.