Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 838 - TChart3D not printing.
Summary: TChart3D not printing.
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: OpenGL 3D (show other bugs)
Version: 140512
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-10 09:38 EDT by narcís calvet
Modified: 2014-07-10 09:38 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description narcís calvet 2014-07-10 09:38:26 EDT
I've been trying to print a TChart3D using either TChart3D.Printlandscape, PrintPortrait, or PrintPartialcanvas, but unfortunately the printed page is always empty. I tried a few different printers (Kyocera FS1370DN, some pdf printers including adobe's and the microsoft XPS printer). Saving the chart to a bitmap file, or copying to the clipboard however is working fine...

CODE: SELECT ALL
Chart3D.PrintLandscape

or by printing to the printer.canvas manually:

CODE: SELECT ALL
Printer.BeginDoc;
Printer.Canvas.TextOut(50, 50, 'printing test text');
Chart3D.PrintPartialCanvas(Printer.Canvas, Rect(100, 100, 2000, 2000));
Printer.EndDoc;

In the above example the "printing test text" line is printed as expected - but no chart in either of the two examples...

StretchDraw doesn't work either:

uses Printers;

procedure TForm1.Button1Click(Sender: TObject);
var meta : TMetafile;
begin
   Chart3D1.BevelOuter := bvNone;
   Meta := Chart3D1.TeeCreateMetafile(True, Chart3D1.ClientRect);
   try
      Printer.Orientation := poPortrait;
      Printer.BeginDoc;
      try
         Printer.Canvas.StretchDraw(Rect(1,1,Printer.PageWidth - 1,
         Printer.PageHeight - 1),Meta);
      finally
         Printer.EndDoc;
      end;
   finally
      Meta.Free;
      Chart3D1.BevelOuter := bvRaised;
   end;
end;

Do I have to prepare the chart for printing ?
Furthermore the call of any of the TChard3D's printing methods erases the chart3d's client area - it shows up as a completely white area - a full redraw has to be performed to show the Tchart as it was showign before calling any of the printing methods ?

The only way I found it works is opening the chart editor and going through the print preview in the editor for printing the chart.