title: failed to find PDF header: '%PDF' not found in xCode
body: <p>I'm trying to create a PDF Object from binary xString in xCode. (OData from SAP, utf-8)</p>
  
  <p>Here is the coding:</p>
  
  <pre><code>const char* buf = [temp1 UTF8String];
  pdffile = [NSData dataWithBytes:buf length:length1];
  [webDisplay loadData:self.pdffile MIMEType:@"application/pdf" textEncodingName:@"utf-8" baseURL:nil];
  self.webDisplay.scalesPageToFit = YES;
  </code></pre>
  
  <p>temp1 is a XString
  length1 is the length of PDF file in bytes.</p>
  
  <p>I get following error message:</p>
  
  <p>failed to find PDF header: '%PDF' not found</p>
  
  <p>Some ideas?</p>