• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: am i loading this pdf data correctly or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: am i loading this pdf data correctly or not?


  • Subject: Re: am i loading this pdf data correctly or not?
  • From: Marcel Weiher <email@hidden>
  • Date: Wed, 6 Aug 2003 14:07:54 +0100

Sorry if I'm being thick but you shouldn't be dumping arbitrary binary data into a string anyway should you?

no not at all, i'm sure you're right. i'm very inexperienced at this sort of thing. how should i specify which encoding? i can't see how to do that. this is the line that needs changing or adding to obviously:

pdfData = [[NSString alloc] initWithContentsOfFile:[[openPanel filenames] objectAtIndex:0]];

should i somehow do it in two steps maybe? any pointers would be much appreciated.

No, you should put it in an NSData, which is a container for a bag of bytes. NSString is for actual textual data, with the semantics of text attached, which the PDF is not. PDF is just data, so NSData is the right way to go.

Marcel

--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
1d480c25f397c4786386135f8e8938e4
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: am i loading this pdf data correctly or not?
      • From: Ben Dougall <email@hidden>
References: 
 >Re: am i loading this pdf data correctly or not? (From: Ben Dougall <email@hidden>)

  • Prev by Date: Re: Cross platform development
  • Next by Date: Re: PDF reader
  • Previous by thread: Re: am i loading this pdf data correctly or not?
  • Next by thread: Re: am i loading this pdf data correctly or not?
  • Index(es):
    • Date
    • Thread