Page 1 of 1

Print multiple graphs to a PDF

Posted: Mon May 27, 2013 3:22 pm
by 16563037
Hello,

I want to print multiple selected bar charts to a PDF. To print multiple selected bar charts to a printer I use:

Code: Select all

  if PrintDialog1.Execute then
  begin
   //If only one selection, print the current bar chart
    if Tree.SelectionCount=1 then
      Graph.PrintLandscape
    else
    begin
      //For mulitple selections, get each selection, graph & print
      for i := 0 to Tree.SelectionCount-1 do
      begin
        GetItemAndGraph(Tree.Selections[i].Text);
        Graph.PrintLandscape;
      end;
  end;
where GetItemAnfGraph just gets the item and displays the graph so that it can be printed. This works great for printing, but does not work when writing to a PDF as the PDF get overwritten.

Is there a way to Append to an existing PDF or some other technique that would enable me to print multiple selected bar charts to a PDF?

Thanks!

Dave

Re: Print multiple graphs to a PDF

Posted: Tue May 28, 2013 2:35 pm
by yeray
Hi Dave,

Have you seen this thread?
http://www.teechart.net/support/viewtop ... pdf#p45008