Fill area with pattern - PDF export issue

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Newbie
Newbie
Posts: 1
Joined: Tue Feb 18, 2020 12:00 am

Fill area with pattern - PDF export issue

Post by » Tue Sep 20, 2022 2:18 pm

Hi,

I would like to use embedded pdf export feature by using TeeSaveToPDFFile function, but I have an issue when an area on chart is filled with a pattern (using TSeriesBandTool). Indeed this area is exported as a blank area into the pdf file:

TeeChart screenshot:
TChartCanvasWithPattern.png
TChartCanvasWithPattern.png (106.47 KiB) Viewed 43127 times

Pdf generated (with TeeSaveToPDFFile function) screenshot:
TChartPdfWithPattern.png
TChartPdfWithPattern.png (31.35 KiB) Viewed 43127 times

I use Delphi XE10.1 Berlin and Steema TeeChart Pro VCL FMX Source Code 2020.31.

Thanks for your help

Anthony

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Fill area with pattern - PDF export issue

Post by Yeray » Tue Sep 27, 2022 6:22 am

Hello Anthony,

I'm afraid patterns aren't exported to pdf. I've added it to the public tracker (#2556)
The same happens with transparencies (#2275).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

tjarrault
Newbie
Newbie
Posts: 2
Joined: Tue Feb 18, 2020 12:00 am

Re: Fill area with pattern - PDF export issue

Post by tjarrault » Mon Oct 03, 2022 4:30 pm

Hello Yeray,

will this fix be part of the next Teechart VCL release?

thanks & regards
Thomas

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Fill area with pattern - PDF export issue

Post by Yeray » Tue Oct 04, 2022 7:54 am

Hello Thomas,

I can't say that.
https://www.steema.com/linkIn/Bug_Fixing_Policy
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

tjarrault
Newbie
Newbie
Posts: 2
Joined: Tue Feb 18, 2020 12:00 am

Re: Fill area with pattern - PDF export issue

Post by tjarrault » Tue Oct 31, 2023 8:50 am

Hello Yeray,

is there any progress on this issue?

thanks & regards

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Fill area with pattern - PDF export issue

Post by Yeray » Thu Nov 02, 2023 8:14 am

Hello,

We've just fixed the exportation of transparencies into pdf.
A workaround, which also works for patterns, is to create the pdf document "manually" (with TPDFCanvas), export the TChart to TBitmap with TeeCreateBitmap, and add that bitmap to the pdf document. Ie:

Code: Select all

procedure TForm1.ExportChartToPdf;
var c : TPDFCanvas;
    b : TBitmap;
const PDF='C:\tmp\chart1.pdf';
begin
  c:=TPDFCanvas.Create;
  try
    b:=Chart1.TeeCreateBitmap;
    try
      c.Draw(0,0,b);
    finally
      b.Free;
    end;

    c.SaveToFile(PDF);
  finally
    c.Free;
  end;
end;
There was a range exception with new IDEs with this technique we've also just fixed.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply