Grid export to PDF changes icon style

0 Answers 99 Views
Grid
Dima
Top achievements
Rank 1
Dima asked on 21 Nov 2023, 03:39 PM

Hi, I have a Kendo JQuery grid with some data and Font Awesome icons in it. They are styled as solid in the grid (font-weight: 900). But then I export the grid to PDF style of icons in the document is regular. Since some of the regular icons are in the pro version of Font Awesome I don't see them in the grid (a rectangle with a cross is displayed instead). How do I change icon style to solid in the exported document?

Please see the example in DoJo: https://dojo.telerik.com/EGuVanuF

Dima
Top achievements
Rank 1
commented on 21 Nov 2023, 06:48 PM

The issue happens with Pro version of Font Awesome. The grid ignores fonts in kendo.pdf and just requests pro-fa-thin-100-0.ttf for some reason

Since this is payed Pro version I can send the JS file name directly to support person because this forum is public. 

Neli
Telerik team
commented on 24 Nov 2023, 09:26 AM

Hi Dima,

I see that you have found the Knowledge Base article that describes such scenarios: - https://docs.telerik.com/kendo-ui/knowledge-base/font-awesome

However, as in the Dojo example provided in your reply there are no icons and the issue is not replicated I am not sure what mught be the cause of it. 

I would suggest to make sure that the URL in the defineFont method is correctly loaded.

What else you could try is using thek-pdf-export class which allows applying custom styles while exporting to PDF:

- https://docs.telerik.com/kendo-ui/framework/pdf/custom-appearance

I hope this helps. 

Regards,

Neli

Dima
Top achievements
Rank 1
commented on 14 Dec 2023, 08:12 AM

Hi Neli,

Thank you for answering the question. Sorry about the delay I was on vacation.

We're using the paid version of the kit from Font Awesome so we don't have TTF files of fonts.

You can find more information about kits here https://fontawesome.com/docs/web/setup/use-kit

If I try to invoke the defineFont method with the link to our font published on our server (under the same domain) KendoUI ignores that link and doesn't do any requests. 

I also cannot use the free version of Font Awesome because it has a different name. In our version it's 'Font Awesome 6 Pro' and in free version it's 'Font Awesome 6 Free'.

I think KendoUI lacking support of these kits. In order to make this sample work https://dojo.telerik.com/EGuVanuF I need to send you the proper private url. Please specify your work email for that.

Neli
Telerik team
commented on 19 Dec 2023, 07:40 AM

Hi Dima,

Usually, we do not provide private emails. Our practice is to discuss any questions about the issues in the threads. 

Could you please check if setting the quotes as mentioned in the following forum thread will be helpful to resolve the issue on your side?

https://www.telerik.com/forums/font-awesome-pro-icons-in-diagram

Regards,

Neli

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dima
Top achievements
Rank 1
Share this question
or