2012-01-03 55 views
0

我想在PDF页面上插入文本。我厌倦了这样的如何将希伯来文本插入pdf?

NSString *str = @"יככעימבבגיננימ"; //hebrew characters 
const char *cstr = [str UTF8String]; 

//绘制

CGContextShowTextAtPoint(PDFPagecontext, 100, 100), cstr,strlen(cstr)); 

PDF页面上的文本,但PDF页面上它看起来像什么,而不是什么,我试图插入别的。任何人都可以告诉我,如果特定文本包含任何希伯来语文本,插入文本的正确方法是什么。

感谢,

loganathan

+0

你用unicode试过了吗?另外,看看我的答案[这里](http://stackoverflow.com/questions/8700292/iphone-emoji-decimal-value-representation/8700398#8700398)其中unicode文本已被设置为UILabel。 – Ilanchezhian 2012-01-03 11:28:57

回答

0

尝试使用NSString附加

CGContextSetTextDrawingMode (ctx, kCGTextFill); //ctx is CGContextRef 
UIGraphicsPushContext(ctx); 
[str drawAtPoint:CGPointMake(100,100) withFont:[UIFont fontWithName:@"Times New Roman" size:10]] 
UIGraphicsPopContext(); 

这对我的作品。

+0

感谢它很好:-) – 2012-01-06 07:44:17

+0

我很高兴我可以帮助你:) – 2012-01-06 09:03:37