PDF printing problems with TeeChart6

TeeChart for ActiveX, COM and ASP
Post Reply
psahay
Newbie
Newbie
Posts: 8
Joined: Tue Nov 18, 2003 5:00 am

PDF printing problems with TeeChart6

Post by psahay » Mon Dec 08, 2003 4:06 pm

I am using the following:

m_tChart.GetExport().GetAsPDF().SaveToFile((LPCTSTR)path);

m_tChart is of CTChart type.
I have set up m_tChart with the following:

m_tChart.SetLeft(0);
m_tChart.SetTop(0);

m_tChart.GetHeader().SetVisible(FALSE);

m_tChart.GetPanel().SetColor(RGB(0xff,0xff,0xff));

m_tChart.GetZoom().SetEnable(FALSE);
m_tChart.GetZoom().SetDirection(tzdHorizontal);

m_tChart.GetScroll().SetEnable(pmNone);

m_tChart.GetAxis().GetLeft().SetAutomatic(FALSE);
m_tChart.GetAxis().GetLeft().SetAutomaticMaximum(FALSE);
m_tChart.GetAxis().GetLeft().SetAutomaticMinimum(FALSE);
m_tChart.GetAxis().GetLeft().SetAutomaticMinimum(FALSE);
m_tChart.GetAxis().GetLeft().GetLabels().SetVisible(FALSE);
m_tChart.GetAxis().GetLeft().GetLabels().SetStyle(talNone);
m_tChart.GetAxis().GetLeft().SetVisible(FALSE);

m_tChart.GetLegend().SetAlignment(laLeft);
m_tChart.GetLegend().SetColorWidth(0);
m_tChart.GetLegend().SetHorizMargin(19);
m_tChart.GetLegend().SetLegendStyle(lsAuto);
m_tChart.GetLegend().GetFont().SetBold(TRUE); //bold
m_tChart.GetLegend().GetFont().SetItalic(TRUE); //italic
m_tChart.GetLegend().GetSymbol().SetPosition(spRight);
m_tChart.GetLegend().GetSymbol().SetWidth(0);
m_tChart.GetLegend().SetTextStyle(ltsPlain);
m_tChart.GetLegend().SetFontSeriesColor(TRUE);
m_tChart.GetLegend().SetTopPos(4);
m_tChart.GetLegend().SetVertspacing(28);

m_tChart.GetAxis().GetRight().SetAutomatic(FALSE);
m_tChart.GetAxis().GetRight().SetAutomaticMaximum(FALSE);
m_tChart.GetAxis().GetRight().SetAutomaticMinimum(FALSE);
m_tChart.GetAxis().GetRight().GetLabels().SetVisible(FALSE);
m_tChart.GetAxis().GetRight().GetLabels().SetStyle(talNone);
m_tChart.GetAxis().GetRight().SetVisible(FALSE);

m_tChart.GetAxis().GetTop().SetAutomatic(FALSE);
m_tChart.GetAxis().GetTop().SetAutomaticMaximum(FALSE);
m_tChart.GetAxis().GetTop().SetAutomaticMinimum(FALSE);
m_tChart.GetAxis().GetTop().GetLabels().SetVisible(FALSE);
m_tChart.GetAxis().GetTop().GetLabels().SetStyle(talNone);
m_tChart.GetAxis().GetTop().SetVisible(FALSE);

m_tChart.GetAxis().GetBottom().SetAutomatic(FALSE);
m_tChart.GetAxis().GetBottom().SetAutomaticMaximum(FALSE);
m_tChart.GetAxis().GetBottom().SetAutomaticMinimum(FALSE);
m_tChart.GetAxis().GetBottom().SetMaximum(800.000000000000000000);
m_tChart.GetAxis().GetBottom().SetMinimum(0.000000000000000000);

m_tChart.GetAspect().SetView3D(FALSE);

m_tChart.GetAxis().AddCustom(0);
m_tChart.GetAxis().AddCustom(0);
m_tChart.GetAxis().AddCustom(0);
m_tChart.GetAxis().AddCustom(0);
m_tChart.GetAxis().AddCustom(0);

CAxis axes0 = m_tChart.GetAxis().GetCustom(0);
axes0.SetAutomatic(FALSE);
axes0.SetAutomaticMaximum(FALSE);
axes0.SetAutomaticMinimum(FALSE);
axes0.SetExactDateTime(FALSE);
axes0.SetIncrement(1.000000000000000000);
axes0.SetOtherside(FALSE);
axes0.SetMaximum(1.000000000000000000);
axes0.SetStartPosition(2.000000000000000000);
axes0.SetEndPosition(17.000000000000000000);

CAxis axes1 = m_tChart.GetAxis().GetCustom(1);
axes1.SetAutomatic(FALSE);
axes1.SetAutomaticMaximum(FALSE);
axes1.SetAutomaticMinimum(FALSE);
axes1.SetExactDateTime(FALSE);
axes1.SetIncrement(1.000000000000000000);
axes1.SetOtherside(FALSE);
axes1.SetMaximum(1.000000000000000000);
axes1.SetStartPosition(22.000000000000000000);
axes1.SetEndPosition(37.000000000000000000);

CAxis axes2 = m_tChart.GetAxis().GetCustom(2);
axes2.SetAutomatic(FALSE);
axes2.SetAutomaticMaximum(FALSE);
axes2.SetAutomaticMinimum(FALSE);
axes2.SetExactDateTime(FALSE);
axes2.SetIncrement(1.000000000000000000);
axes2.SetOtherside(FALSE);
axes2.SetMaximum(1.000000000000000000);
axes2.SetStartPosition(42.000000000000000000);
axes2.SetEndPosition(57.000000000000000000);

CAxis axes3 = m_tChart.GetAxis().GetCustom(3);
axes3.SetAutomatic(FALSE);
axes3.SetAutomaticMaximum(FALSE);
axes3.SetAutomaticMinimum(FALSE);
axes3.SetExactDateTime(FALSE);
axes3.SetIncrement(1.000000000000000000);
axes3.SetOtherside(FALSE);
axes3.SetMaximum(1.000000000000000000);
axes3.SetStartPosition(62.000000000000000000);
axes3.SetEndPosition(77.000000000000000000);

CAxis axes4 = m_tChart.GetAxis().GetCustom(4);
axes4.SetAutomatic(FALSE);
axes4.SetAutomaticMaximum(FALSE);
axes4.SetAutomaticMinimum(FALSE);
axes4.SetExactDateTime(FALSE);
axes4.SetIncrement(1.000000000000000000);
axes4.SetOtherside(FALSE);
axes4.SetMaximum(1.000000000000000000);
axes4.SetStartPosition(82.000000000000000000);
axes4.SetEndPosition(97.000000000000000000);

m_tChart.RemoveAllSeries();
m_tChart.AddSeries(scLine);
m_tChart.AddSeries(scLine);
m_tChart.AddSeries(scLine);
m_tChart.AddSeries(scLine);
m_tChart.AddSeries(scLine);

m_tChart.Series(0).GetAsLine().SetColorEachLine(TRUE);
m_tChart.Series(0).GetMarks().GetArrow().SetWidth(4);
m_tChart.Series(0).GetMarks().SetArrowLength(8);
m_tChart.Series(0).GetMarks().GetCallout().GetArrow().SetWidth(4);
m_tChart.Series(0).GetMarks().SetVisible(FALSE);
m_tChart.Series(0).SetColor(RGB(0x46,0x82,0xb4));
m_tChart.Series(0).SetTitle("STC");
m_tChart.Series(0).SetVerticalAxis(aCustomVertAxis);
m_tChart.Series(0).GetAsLine().GetBrush().SetColor(RGB(0,255,255));
m_tChart.Series(0).GetAsLine().GetLinePen().SetWidth(2);
m_tChart.Series(0).GetAsLine().SetClickableLine(FALSE);
m_tChart.Series(0).GetAsLine().SetDark3D(FALSE);
m_tChart.Series(0).GetAsLine().GetLinePen().SetColor(RGB(0,255,255));
m_tChart.Series(0).GetAsLine().GetPointer().SetInflateMargins(TRUE);
m_tChart.Series(0).GetAsLine().GetPointer().SetStyle(psRectangle);
m_tChart.Series(0).GetAsLine().GetPointer().SetVisible(FALSE);
m_tChart.Series(0).GetAsLine().SetStairs(TRUE);
m_tChart.Series(0).GetXValues().SetOrder(loAscending);
m_tChart.Series(0).SetVerticalAxisCustom(0);

m_tChart.Series(1).GetAsLine().SetColorEachLine(TRUE);
m_tChart.Series(1).GetMarks().GetArrow().SetWidth(4);
m_tChart.Series(1).GetMarks().SetArrowLength(8);
m_tChart.Series(1).GetMarks().GetCallout().GetArrow().SetWidth(4);
m_tChart.Series(1).GetMarks().SetVisible(FALSE);
m_tChart.Series(1).SetColor(RGB(0xff,0x0,0x0));
m_tChart.Series(1).SetTitle("RXD");
m_tChart.Series(1).SetVerticalAxis(aCustomVertAxis);
m_tChart.Series(1).GetAsLine().GetBrush().SetColor(RGB(0,255,255));
m_tChart.Series(1).GetAsLine().SetClickableLine(FALSE);
m_tChart.Series(1).GetAsLine().SetDark3D(FALSE);
m_tChart.Series(1).GetAsLine().GetLinePen().SetColor(RGB(0,255,255));
m_tChart.Series(1).GetAsLine().GetLinePen().SetWidth(2);
m_tChart.Series(1).GetAsLine().GetPointer().SetInflateMargins(TRUE);
m_tChart.Series(1).GetAsLine().GetPointer().SetStyle(psRectangle);
m_tChart.Series(1).GetAsLine().GetPointer().SetVisible(FALSE);
m_tChart.Series(1).GetAsLine().SetStairs(TRUE);
m_tChart.Series(1).GetXValues().SetOrder(loAscending);
m_tChart.Series(1).SetVerticalAxisCustom(1);


m_tChart.Series(2).GetAsLine().SetColorEachLine(TRUE);
m_tChart.Series(2).GetMarks().GetArrow().SetWidth(4);
m_tChart.Series(2).GetMarks().SetArrowLength(8);
m_tChart.Series(2).GetMarks().GetCallout().GetArrow().SetWidth(4);
m_tChart.Series(2).GetMarks().SetVisible(FALSE);
m_tChart.Series(2).SetColor(RGB(0x41,0x69,0xe1));
m_tChart.Series(2).SetTitle("TXD");
m_tChart.Series(2).SetVerticalAxis(aCustomVertAxis);
m_tChart.Series(2).GetAsLine().GetBrush().SetColor(RGB(0,255,255));
m_tChart.Series(2).GetAsLine().SetClickableLine(FALSE);
m_tChart.Series(2).GetAsLine().SetDark3D(FALSE);
m_tChart.Series(2).GetAsLine().GetLinePen().SetColor(RGB(0,255,255));
m_tChart.Series(2).GetAsLine().GetLinePen().SetWidth(2);
m_tChart.Series(2).GetAsLine().GetPointer().SetInflateMargins(TRUE);
m_tChart.Series(2).GetAsLine().GetPointer().SetStyle(psRectangle);
m_tChart.Series(2).GetAsLine().GetPointer().SetVisible(FALSE);
m_tChart.Series(2).GetAsLine().SetStairs(TRUE);
m_tChart.Series(2).GetXValues().SetOrder(loAscending);
m_tChart.Series(2).SetVerticalAxisCustom(2);

m_tChart.Series(3).GetAsLine().SetColorEachLine(TRUE);
m_tChart.Series(3).GetMarks().GetArrow().SetWidth(4);
m_tChart.Series(3).GetMarks().SetArrowLength(8);
m_tChart.Series(3).GetMarks().GetCallout().GetArrow().SetWidth(4);
m_tChart.Series(3).GetMarks().SetVisible(FALSE);
m_tChart.Series(3).SetColor(RGB(0x0,0x80,0x0));
m_tChart.Series(3).SetTitle("RXC");
m_tChart.Series(3).SetVerticalAxis(aCustomVertAxis);
m_tChart.Series(3).GetAsLine().GetBrush().SetColor(RGB(0,255,255));
m_tChart.Series(3).GetAsLine().GetLinePen().SetWidth(2);
m_tChart.Series(3).GetAsLine().SetClickableLine(FALSE);
m_tChart.Series(3).GetAsLine().SetDark3D(FALSE);
m_tChart.Series(3).GetAsLine().GetLinePen().SetColor(RGB(0,255,255));
m_tChart.Series(3).GetAsLine().GetPointer().SetInflateMargins(TRUE);
m_tChart.Series(3).GetAsLine().GetPointer().SetStyle(psRectangle);
m_tChart.Series(3).GetAsLine().GetPointer().SetVisible(FALSE);
m_tChart.Series(3).GetAsLine().SetStairs(TRUE);
m_tChart.Series(3).GetXValues().SetOrder(loAscending);
m_tChart.Series(3).SetVerticalAxisCustom(3);

m_tChart.Series(4).GetAsLine().SetColorEachLine(TRUE);
m_tChart.Series(4).GetMarks().GetArrow().SetWidth(4);
m_tChart.Series(4).GetMarks().SetArrowLength(8);
m_tChart.Series(4).GetMarks().GetCallout().GetArrow().SetWidth(4);
m_tChart.Series(4).GetMarks().SetVisible(FALSE);
m_tChart.Series(4).SetColor(RGB(0xda,0xa5,0x20));
m_tChart.Series(4).SetTitle("TXC");
m_tChart.Series(4).SetVerticalAxis(aCustomVertAxis);
m_tChart.Series(4).GetAsLine().GetBrush().SetColor(RGB(0,255,255));
m_tChart.Series(4).GetAsLine().GetLinePen().SetWidth(2);
m_tChart.Series(4).GetAsLine().SetClickableLine(FALSE);
m_tChart.Series(4).GetAsLine().GetLinePen().SetColor(RGB(0,255,255));
m_tChart.Series(4).GetAsLine().GetPointer().SetInflateMargins(TRUE);
m_tChart.Series(4).GetAsLine().GetPointer().SetStyle(psRectangle);
m_tChart.Series(4).GetAsLine().GetPointer().SetVisible(FALSE);
m_tChart.Series(4).GetAsLine().SetStairs(TRUE);
m_tChart.Series(4).GetXValues().SetOrder(loAscending);
m_tChart.Series(4).SetVerticalAxisCustom(4);

I have two problems:

1) The colors for the series' square waves are not carried over to the pdf file. Each of the five square waves are BLACK rather than the colors designated. The GUI shows the colors fine.

2) After zooming, a small part of each series' plot is printed past the point where the horizontal axis ends. The plot continues a little way even though there is no more x axis for the series to be plotted on. Again, the GUI zooms fine.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Dec 08, 2003 8:24 pm

Hi.

The first problem looks like a bug to me (pdf Canvas is not able to set current pen properties). But I was not able to replicate it here using the latest TeeChart (VCL) version.

The second problem is more a missing feature. Clipping in PDF Canvas is not yet supported. To be more precise, the internal ClipRectangle and UnClip methods do not work in all cases. We'll try to improve this in next major teeChart release.
Marjan Slatinek,
http://www.steema.com

pngny1
Newbie
Newbie
Posts: 5
Joined: Tue Jun 15, 2004 4:00 am

Post by pngny1 » Wed Jan 12, 2005 9:31 pm

I have V6 ActiveX TeeChart control, and I have the same problem -- pen properties are not being carried over to the pdf Canvas.

Is this a confirmed bug in the ActiveX control? How can I get a fix? Does V7 have the fix?

Thanks.

Paul Ng
New York, NY, USA
+1.212.538.8850

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jan 14, 2005 12:49 pm

Hi Paul,

yes, a confirmed bug. It also happens with the latest v7.03. You will only get a correct results when the width of the line series is set to 1 (default). It's already on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.

adim
Newbie
Newbie
Posts: 2
Joined: Mon Jul 13, 2009 12:00 am

Re: PDF printing problems with TeeChart6

Post by adim » Fri May 07, 2010 10:50 am

Using latest TeeChart ActiveX (v8.0.0.8.10301).

v6, v7 now v8. Looks like "pen properties are not being carried over to the pdf Canvas" is a perpetual bug. :mrgreen:
Is this on a current defect list or you guys give up? :roll:

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: PDF printing problems with TeeChart6

Post by Narcís » Mon May 10, 2010 11:04 am

Hi adim,

Yes, this is still on the bug list to be investigated with ID. number TV52014346.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply