Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:38:02+00:00 2026-06-03T02:38:02+00:00

I have an application in which i am loading a pdf from the bundle

  • 0

I have an application in which i am loading a pdf from the bundle by using

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

Now i want to load it from my web server. I was done it with a string url using

NSString *strUlr = [NSString stringWithFormat:@"https://s3.amazonaws.com/hgjgj.pdf"];

CFStringRef aCFString = (CFStringRef)strUlr;

//CFURLRef pdfURL = aCFString;
// NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);

CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(),aCFString, NULL, NULL);
pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
   NSLog(@"%@",pdf);
//CFRelease(pdfURL);

but with no success..Can anybody knows how to make this code working.I dont need to load it in to pdf because of some reasons.Can anybody help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:38:04+00:00Added an answer on June 3, 2026 at 2:38 am

    You still try to get url to resource that is supposed to be in your application bundle, not on remote server. Correct method to create url will be CFURLCreateWithString:

    CFURLRef pdfURL = CFURLCreateWithString(NULL, aCFString, NULL);
    

    Keep in mind that it may be better to download your pdf and cache it locally before display – that approach will also give you more flexibility in error handling and probable authentication challenges for your url

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which i build using gcc on linux host for ARM
I have a application which is loading PlugIn-Modules with reflection. The Application is defining
I have a flex application which use DragManager. When I'm loading this application into
I have an android application which in its main activity, data are adapted from
I have an application which needs to load data from a remote server (businesses
I have written an application which loads information from a plist which lies on
I have written an application which is using NHibernate to provide the underlying object
I have a winforms application in which I am using 2 Forms to display
i have windows application in which i am using crystal report. i use to
I have recently put together a JWS application which gets it's argument from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.