TPreview
component

This is freeware component and distributed with full source codes. Using in commercial projects is not  prohibited, but required copyrights labels in about-box and technical documentation of project. 
Available version 3.0
You can download and test it. At present the work on the next version of the component is being carried out. All the errors, that were noticed while testing by different users of version 3.0, will be eliminated in new version.
Installation features:
I've received a lot of letters with the following content: "Can't install the package. Fatal error - file dsgnintf.pas not found...". The point is that this file is from  Delphi distribution, but for some reason it is not in $(DELPHI)\Lib\, and path to it ($(DELPHI)\Source\Toolsapi\) is not included in Delphi IDE. I recommend just to copy it to $(DELPHI)\Lib\  and everything will be ok. 
I also wanna tell that in $(DELPHI)\Source\Toolsapi\ folder there are also other useful files. These files are required for programming of design-time objects (property editors, component editors, experts and so on. )

  Description:

 
  TPreview component is destined for printing information with the possibility of its preview. The component is a good alternative for standard TPrinter object because it has the following advantages in comparison with this object: 

  1. All printing information is drawn by the means of TPaper object property. It is an analogue for TCanvas, it includes almost the same methods with the same names and params and additional possibilities of regions drawing, gradient brushes & etc; 
  2. The information is stored in vector format, that gives us possibility to browse the result in preview window with any scale;
  3. Al  coordinates aren't in pixels but in one of  the selected metrical units;
  4. The result is always correctly displayed with any paper format and printer resolution;
  5. The possibility to assign standard and user defined paper formats;
  6. Easy and customizable preview window that can be redefined by user;
  7. Multipages support;
  8. Saving and loading into files of the preview information with different options;
  9. Pages export into different graphical formats.


The component gives us the possibility to form application that should print custom graphical data. The preview window allows us to change the scale within the certain range. The increase of pages count doesn't increase the size of  allocated  memory..

Sample - preview window




 
почта