0

How can i use this ® symbol in itextsharp i have already tried Times New Roman below is my code

BaseFont bfEngInt = BaseFont.CreateFont(@"C:\WINDOWS\Fonts\TimesNewRoman.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);

Font GridViewfontCh = new Font(bfEngInt, 10);
  • You are using an old version of iTextSharp. Would you consider upgrading to the latest version? Today, iTextSharp has been renamed to iText for .NET, and the current version is iText 7.1.2. See the [download page on the official web site](https://developers.itextpdf.com/itext7/download-and-install-information/NET). Sure, you can find *maintenance* releases of iText 5, but those are meant for customers who have a support contract with iText software. For non-paying users, iText 5 (or iTextSharp as you call it) is no longer supported. – Bruno Lowagie May 31 '18 at 07:48
  • Moreover, your question is very similar to [How to display indian rupee symbol?](http://stackoverflow.com/questions/17465183) and [Unable to print mathematical characters like ∈, ∩, ∑, ∫, ∆ √, ∠](https://stackoverflow.com/questions/31268867). I think it should be closed as a duplicate. The unicode value of the ® symbol is [`/u00ae`](https://www.fileformat.info/info/unicode/char/00ae/index.htm). That's the only difference between this question and the duplicate questions. – Bruno Lowagie May 31 '18 at 07:55
  • Got it, thank you very much – thomas Lin May 31 '18 at 08:19
  • Hi sorry, one more question my string value is from Data GridView. Like is "Levofloxacin (Cravit® 250mg/50ml/bot)", "Levofloxacin (Cravit® 500mg/100ml/bot)", how to use unicode value in for-loop?? – thomas Lin Jun 01 '18 at 09:22
  • I don't understand the extra question. Shouldn't your string be `"Levofloxacin (Cravit\u00ae 250mg/50ml/bot)"`? If not, are you sure that the encoding used by Data GridView is correct? It should be UTF-8. – Bruno Lowagie Jun 01 '18 at 09:43

0 Answers0