I am using following to draw text on PDF in iOS:
CGContextSelectFont (pdfContext, "Helvetica Bold", 14, kCGEncodingMacRoman);
NSString *str1 = [NSString stringWithString:@"€ 10"];
CGContextShowTextAtPoint(pdfContext, 25, y-60 , [str1 cStringUsingEncoding:NSMacOSRomanStringEncoding], [str1 length]);
The euro sign is displayed as square.
Do you have some suggestions?
ps. i have tries with [str1 UTF8String] too, the same result
In most cases it is easier to use NSString Methods
- (CGSize)drawAtPoint:(CGPoint)point withFont:(UIFont *)fontor- (CGSize)drawInRect:(CGRect)rect withFont:(UIFont *)fontrather than the CoreGraphic equivalents. Apple takes care about thinks like correct transformation, encoding etc. for you.