ThinkGeo.com    |     Blog    |     Wiki    |     Support

Linear Gradient Style Does Not Print Correctly

Hi,

We recently tried printing using an area style with the GeoLinearGradientBrush as the Advanced property. We found that the gradient does not draw correctly when creating a pdf with PdfSharp or Microsoft PDF Printer. I have attached a sample project so you can see. Also attached is a sample pdf to demonstrate the problem.

Please have a look and see if it’s a bug.

Thanks!

Steve

Microsoft PDF Doc.pdf (160.1 KB)

PrintGradientStylesSample.zip (52.8 KB)

Hi Steve,

Thanks to point that, it looks because the structure problem, we hadn’t implement the LinearGradientBrush succeed for PDF, when I test your sample and click “Make PdfSharp”, the result is print as the start color.

I had let our developer knows it.

And the Microsoft PDF print looks maybe a bug, our developer will look into it at the same time.

Any update I will let you know.

Regards,

Ethan

Hi Steve,

Here is an update, the old logic for LinearGradientBrush don’t works well for both PDF and for Printer, some result of them for example LinearGradientBrush for text style looks strange.

Our developer is busy for new release these days and don’t have enough time to complete the new logic, They will go on implement it after back from vacation.

Any update I will let you know.

Regards,

Ethan

Hi Steve,

Our developer had make the GeoLinearGradientBrush works well for PDF and Pinter, please test that with the last package after today.

Regards,

Ethan

Hi Ethan,

I updated to the latest production version and no change. What dll and what version do I need?

Thanks!

Steve

Hi Steve,

Please try the packages as below:



Regards,

Ethan

Ethan,

Thanks. It still does not work for me with PdfSharp, but we don’t use PdfSharp anyway. And our users don’t seem to use LinearGradientStyle that much. Do you know when this fix will be available in a production build?

Thanks!

Steve

Hi Steve,

Do you means the PDF still don’t works well in latest development package? We test again and will look into that.

We will move the changes into production branch in next minor release, if that’s hurry for you please let us know, we can try to move it manual, but because this change related many classes, so it’s not easy to do that, we need to make sure it had been fixed and it’s stable at first.

Regards,

Ethan

Ethan,

It works with the Microsoft PDF Printer but not with PdfSharp.

Steve

Hi Steve,

Does PDF still don’t works there?

With latest packages, test the sample with “Make Pdf Sharp” button it works well.

If it still don’t works please provide us more detail information.

Regards,

Ethan