utf-8 encoding of pdf content xcode

hello i am using leaves view to display pdf pages.it is working perfectly fine with pdf having english character but when call pdf which is having arabic content my app crashes.i am using the code below

- (id)init 
    if (self = [super init]) 

CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("**paper.pdf**"),NULL, NULL);

        pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
        mysearch= [pdfsearch alloc];
        //NSString*val=[mysearch loadparser];
    return self;

can any anyone tell me how to encode its contents before calling its name on cfbundlecopyresource url. thanks


You can also use NSURL to create a pdf from a proper unicode-NSString path.

Here's a snippet:

            NSURL *pdfUrl = [self fileUrlWithFileName:file]; 
            CGPDFDocumentRef document = CGPDFDocumentCreateWithURL((__bridge CFURLRef)pdfUrl);

(note that the __bridge is only needed if you use ARC)

Need Your Help

Compiling a LaTeX document from C++ program

c++ osx compilation latex

I am writing a C++ program which has to automatically generate some data to be used by students in an integrated exercise. I have already exported this data to .tex files and would also like the C++

C2DM Push chat application

java android chat android-c2dm

Currenlty I am trying to develop a simple chat application for Android. I want to create something that works like WhatsApp. Because it should be realtime, I think C2DM is the best way to send a

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.