Chapter 27: Printing, Creating PDF Documents, and Refactoring


Overview

In this chapter, you'll first learn the basics of printing and then you'll learn how to create a pretty complex component: TTextPrinter. The TTextPrinter component is a TComponent descendant able to print both plain text documents and Delphi source files. The TTextPrinter component even prints syntax highlighting: reserved words, directives, and comments, both single-line and block. However, several details are not implemented because the discussion of the component would be too long to fit into a single chapter, but feel free to implement these details yourself.

This chapter also shows how to use the Refactoring commands available in Delphi to restructure several parts of the TTextPrinter component in order to make it more readable and more robust.

The chapter ends with a description of the PDF file format and shows how to print, or more precisely, how to export text files to a PDF document.



Inside Delphi 2006
Inside Delphi 2006 (Wordware Delphi Developers Library)
ISBN: 1598220039
EAN: 2147483647
Year: 2004
Pages: 212
Authors: Ivan Hladni

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net