5

I'm trying to get my text bold in PDF.
I am using HTML to PDF converter from Select.Pdf (C#).
http://selectpdf.com/

I have included text style() in html but eventually it is not working.
I have also tried adding strong tag and b tag in HTML. But no success.

Kindly anybody save me!
Thanks

2 Answers2

3

First of all I would like to say. You should always try to provide us with some code.

My guess is that you might be using some unique fonts which don't support BOLD or ITALIC .

Please give it a try and let me know if it worked.

Manish Gupta
  • 1,355
  • 13
  • 32
0

Could you please provide me with some of the HTML that is not being converted correctly and a snippet of the C# logic being used so I can get a better understanding?

I was able to produce the desired result using the following:

SelectPdf.HtmlToPdf convertor = new SelectPdf.HtmlToPdf();
convertor.Options.PdfPageSize = SelectPdf.PdfPageSize.A4;
convertor.Options.PdfPageOrientation = SelectPdf.PdfPageOrientation.Portrait;

SelectPdf.PdfDocument doc = convertor.ConvertHtmlString("<strong>bold</strong> normal");
doc.Save("/Pdfs/test.pdf");
doc.Close();

Example produced by above code

Oblongata
  • 86
  • 5