Reputation: 330
I'm working on pdf document where I have to include some special characters in cell phrases, I tried to search relevant result but did not found any
The character is a +- sign. additionally square, cube sign as well.
Here is my code snippet
public Font calibri_7 = FontFactory.GetFont("Calibri", 7, Font.NORMAL);
PdfPCell cb21 = new PdfPCell(new Phrase("50+/-25", calibri_7));
What changes I need to do in order to get it, thanks!
Upvotes: 1
Views: 1438
Reputation: 671
To place that character in your pdf you should use the unicode character escape: \u2213. If you want to know about other special character unicode notations, then I would like to suggest the next resource: https://charbase.com/block/mathematical-operators
Your code should then be modified to the following:
PdfPCell cb21 = new PdfPCell(new Phrase("\u00B1", calibri_7));
Upvotes: 1