How to get letters bold in pdf using FixedContentEditor

1 Answer 122 Views
PdfProcessing
Aishwarya
Top achievements
Rank 1
Aishwarya asked on 18 Jul 2022, 05:27 AM

Hi,

I have used the below code to get letters bold in creating the pdf .

block.TextProperties.TrySetFont(new FontFamily("Calibri Light (Headings)"), FontStyles.Normal, FontWeights.Bold);

But I am not able to see the result in pdf . Provide me if any solution available. 

I have used the FixedContentEditor in creating the pdf.

            RadFixedDocument radFixedDocument = new RadFixedDocument();
            RadFixedPage page = radFixedDocument.Pages.AddPage();
            FixedContentEditor editor = new FixedContentEditor(page);

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Svilen
Telerik team
answered on 20 Jul 2022, 01:52 PM

Hello, Aishwarya,

My name is Svilen and it would be my pleasure to assist here.

In order for me to do so, I'd need some more information regarding your project and font file:

1. Are you using the .NET Framework or .NET Standard assemblies? If you are using the former, if the font is present on your system's OS it should be accessible to your project. If you are using the latter, you'd need to follow our Cross-Platform/Fonts article to make sure you've configured the FixedExtensibilityManager. I am attaching a simple .NET Standard project that imports some fonts from .ttf files and successfully prints bold text for your ease. If you are using .NET Framework, please send a small project, which shows the issue.

2. Do you mind sharing the "Calibri Light (Headings)" .ttf file? I was unable to find it on the web. Another possible issue might be, that the font name is incorrect or the font used simply does not have a bold version.

I will stand by for your input.

Regards,
Svilen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Upscale
Top achievements
Rank 1
commented on 06 Aug 2022, 12:15 PM

I faced the same issue and reported the error to Help Center. No replay came out. Thank you for this worthy comment. It has finally solved my issue too. Thanks again.
Dimitar
Telerik team
commented on 08 Aug 2022, 12:40 PM

Hi, 

I am glad that the solution worked for you.

I have checked your account and all of your current treads are answered. Have you used another account to post a ticket? Can share which tread remained unanswered? Please note that we are usually handling the forum threads as well, but this can take some time. If you have an urgent issue I would suggest using the ticketing system where each tread has an exact response time. 

Thank you for your understanding.

 

Tags
PdfProcessing
Asked by
Aishwarya
Top achievements
Rank 1
Answers by
Svilen
Telerik team
Share this question
or