Very long canvas - print fail
Very long canvas - print fail
Hi,
I have a problem when i want to print (in pdf throught PDFCreator in attachement) a chart with a very big height.
I use TeeCreateMetafile after having resize chart canvas with requested big height.
Then I use Printer.Canvas.StretchDraw to draw on pdf canvas.
In attached example, we can see that problem occurs on page 34.
Problem is that serie plot seems to be blocked at a certain Y, like if there is a limitation.
I use Delphi 2009 and TeeChart 8.08.
Thanks for your help
Anthony
I have a problem when i want to print (in pdf throught PDFCreator in attachement) a chart with a very big height.
I use TeeCreateMetafile after having resize chart canvas with requested big height.
Then I use Printer.Canvas.StretchDraw to draw on pdf canvas.
In attached example, we can see that problem occurs on page 34.
Problem is that serie plot seems to be blocked at a certain Y, like if there is a limitation.
I use Delphi 2009 and TeeChart 8.08.
Thanks for your help
Anthony
- Attachments
-
- TestTChartLongCanvas.zip
- (11.59 KiB) Downloaded 1650 times
Re: Very long canvas - print fail
Hello Anthony,
It seems to work fine with TeeChart v2017.22, RAD XE and PdfCreator v2.5.2: Could you please try it with the latest version?
It seems to work fine with TeeChart v2017.22, RAD XE and PdfCreator v2.5.2: Could you please try it with the latest version?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Very long canvas - print fail
Hello everyone.
Back to this problem.
Printing fails again using version V2020.29.200113 and PDFCreator 2.4.1 neither with PDFCreator 4.0.4.
Any idea ?
Thanks for your help.
Back to this problem.
Printing fails again using version V2020.29.200113 and PDFCreator 2.4.1 neither with PDFCreator 4.0.4.
Any idea ?
Thanks for your help.
Re: Very long canvas - print fail
Hello,
It isn't failing for me with RAD Rio 10.3.3, TeeChart Pro v2020.29 and PDFCreator 4.0.4:
It isn't failing for me with RAD Rio 10.3.3, TeeChart Pro v2020.29 and PDFCreator 4.0.4:
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Very long canvas - print fail
Thanks for your reply Yeray.
Some thing's weird.
When I launch your attachment with Acrobat reader 2020.009.20063 .
The printing looks failed.
Some thing's weird.
When I launch your attachment with Acrobat reader 2020.009.20063 .
The printing looks failed.
Re: Very long canvas - print fail
Sorry, screen shot forgotten .
- Attachments
-
- Print.png (16.57 KiB) Viewed 37486 times
Re: Very long canvas - print fail
Hello,
I could reproduce that and it seems like a problem with the metafile generation.
I could reproduce that and it seems like a problem with the metafile generation.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Very long canvas - print fail
Hello Yeray,
So, how can i fix it ?
Is this an internal TChart problem ?
If so, can we expect a patch ?
Thank you for your help.
So, how can i fix it ?
Is this an internal TChart problem ?
If so, can we expect a patch ?
Thank you for your help.
Re: Very long canvas - print fail
Hello,
This appears to be a size limit for a Windows Metafile of 32767 pixels.
Ref.
https://stackoverflow.com/questions/342 ... -metafiles
If the test is run at 33 pages a metafile of 1036x31317 pixels is created. It appears that one page more tips the file over the size limit.
Regards,
Marc Meumann
This appears to be a size limit for a Windows Metafile of 32767 pixels.
Ref.
https://stackoverflow.com/questions/342 ... -metafiles
If the test is run at 33 pages a metafile of 1036x31317 pixels is created. It appears that one page more tips the file over the size limit.
Regards,
Marc Meumann
Steema Support
Re: Very long canvas - print fail
Hello Marc,
Thank you for your investigation. It's interesting.
However we had already seen that it worked properly.
So, back to the 2018-24 version, we can see that it works well.
Then, I couldn't install 2018-25 version, cause the recompilation does not work,
then, after installation of the 2018-26 version, we can see that the problem of the canvas reappears.
Regards.
Thank you for your investigation. It's interesting.
However we had already seen that it worked properly.
So, back to the 2018-24 version, we can see that it works well.
Then, I couldn't install 2018-25 version, cause the recompilation does not work,
then, after installation of the 2018-26 version, we can see that the problem of the canvas reappears.
Regards.
- Attachments
-
- TestTChartLongCanvas_V2018-26.zip
- (224.17 KiB) Downloaded 1502 times
-
- TestTChartLongCanvas_V2018-24.zip
- (225.75 KiB) Downloaded 1500 times
Re: Very long canvas - print fail
Hello,
If you export to metafile in both cases there may be a clue to the different behaviour.
Regards,
Marc
If you export to metafile in both cases there may be a clue to the different behaviour.
Regards,
Marc
Re: Very long canvas - print fail
Hi Marc,
Here are the two metafiles created with v24 and v30.
No difference was found.
Then I checked StretchDraw procedure in each v24 and v30, saw no difference.
What a mystery
Here are the two metafiles created with v24 and v30.
No difference was found.
Then I checked StretchDraw procedure in each v24 and v30, saw no difference.
What a mystery
- Attachments
-
- MetaFiles.zip
- (338 Bytes) Downloaded 1407 times
Re: Very long canvas - print fail
Hello,
The metafiles don't seem to have saved correctly in the zip you posted, but we'll take another look at this to see if we can shed any light. With the current version of TeeChart the plot cuts the last data points in the metafile at exactly 32,767 pixels, the known limit for a metafile. The canvas continues to plot gridlines to the required size limit though (33,000+ pixels), that raises suspicions that some other factor is involved. I don't see any obvious cause, the TeeChart code relating to metafile generation hasn't changed for a very long time, but we will go through it again.
Regards,
Marc
The metafiles don't seem to have saved correctly in the zip you posted, but we'll take another look at this to see if we can shed any light. With the current version of TeeChart the plot cuts the last data points in the metafile at exactly 32,767 pixels, the known limit for a metafile. The canvas continues to plot gridlines to the required size limit though (33,000+ pixels), that raises suspicions that some other factor is involved. I don't see any obvious cause, the TeeChart code relating to metafile generation hasn't changed for a very long time, but we will go through it again.
Regards,
Marc
Steema Support
Re: Very long canvas - print fail
Hi,
Found it. There is a maximum pixel limitation setting in TeeChart, used to control out-of-bound axis calculations, that we'll need to review. It's currently set to $7FFF (decimal 32767).
Whilst we check what to do, if you have the sourcecode version you can modify it as an interim workaround:
ie.
TeEngine.pas
In the initialization section at the end of the unit:
change to: (for example)
We'll probably need to change this to an accessible variable so that it can adjust to unusual circumstances such as the case here in hand.
Sorry for the delay in finding this.
Regards,
Marc
Found it. There is a maximum pixel limitation setting in TeeChart, used to control out-of-bound axis calculations, that we'll need to review. It's currently set to $7FFF (decimal 32767).
Whilst we check what to do, if you have the sourcecode version you can modify it as an interim workaround:
ie.
TeEngine.pas
In the initialization section at the end of the unit:
TeeMaxPixelPos:=$7FFF;
change to: (for example)
TeeMaxPixelPos:=34000;
We'll probably need to change this to an accessible variable so that it can adjust to unusual circumstances such as the case here in hand.
Sorry for the delay in finding this.
Regards,
Marc
Re: Very long canvas - print fail
Hello,
I've moved the
I've moved the
TeeMaxPixelPos
variable to interface
section so from the next version you'd be able to set it as follows:
Code: Select all
VCLTee.TeEngine.TeeMaxPixelPos:=34000;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |