The documentation for this article, which appears to be quite extensive, is in French, as are the source code comments. If you need translation, you can http://world.altavista.com/. Also, please be aware of the explicitly stated LGPL license for this code. -- Editor<!-- Add the rest of your HTML here -->
A basic window :
The component provides a hardcopy print & print preview. (In this case no custom header/footer).
The picture shows the preview for a 'text' preview. The framework calculates the number of pages. The user simply has to put data in a
instance. In this case we use a derived class to customize the header and the footer...
<!------------------------------- STEP 3 ---------------------------><!-- Add the article text. Please use simple formatting (
The source contains pdf and html documentation with UML schema, refactoring & a using section. A small demonstration project is also present in this zip.
The code simplifies the print and preview of a window. The main idea is to provide a canvas for obtain a 'textual view' of the data.
Users have just to describe the contains of a windows in a
CDocText. The framework calculate the number of characters per page and the number of pages.
The formatting is simple but sufficient for current needs :
customize header & footer
bold or normal fonts
EmptyLine, Title, Data=(Label, Value), List
FreeText and FreeTable
Using the code
The printer dll contains all the code. So the $Devp\bin must be in the $PATH to execute the program 'test.exe'. (or you must copy the dll in your source project).
All the source are in the namespace printer, so use instruction like
using namespace printer; to access classes.
The directory 'Test' contains a small demo. In this project we show how we can use a factory to simplify the creation of textual view. In this particular case the project must active the RTTI and accept some limitations in the choice of resource's name.
A more traditionnal way is always possible : just add data to your
CTextPrinter instance with instruction like :
LGPL - see /Doc/Licence/Lgpl.txt