How can I export a chart over multiple pages, similar to printing over multiple pages?
I want to export a chart to a multi-page PDF file.
Thanks and regards.
exporting multiple pages
Hi,
you can use similar routine like the used for the "Print Multiple pages".
Here is the PrintPages routine:
As you can see, nothing special to it. It simply traverses all chart pages
and prints them to separate printer pages. You can use similar code to export it in a Multiple pages.
you can use similar routine like the used for the "Print Multiple pages".
Here is the PrintPages routine:
Code: Select all
{ Sends pages to the printer. This only applies when the
Chart has more than one page (MaxPointsPerPage property).
If no parameters are passed, all pages are printed.
If only one page exists, then it's printed. }
procedure TCustomAxisPanel.PrintPages(FromPage, ToPage: Integer);
var tmpOld : Integer;
t : Integer;
R : TRect;
begin
if Name<>'' then Printer.Title:=Name; { 5.01 }
Printer.BeginDoc;
try
if ToPage=0 then ToPage:=NumPages;
if FromPage=0 then FromPage:=1;
tmpOld:=Page;
try
R:=ChartPrintRect;
for t:=FromPage to ToPage do
begin
Page:=t;
PrintPartial(R);
if t<ToPage then Printer.NewPage;
end;
finally
Page:=tmpOld;
end;
Printer.EndDoc;
except
on Exception do
begin
Printer.Abort;
if Printer.Printing then Printer.EndDoc;
Raise;
end;
end;
end;
and prints them to separate printer pages. You can use similar code to export it in a Multiple pages.
Pep Jorge
http://support.steema.com
http://support.steema.com