failed to find PDF header: '%PDF' not found in xCode
Posted
by
Alexander
on Stack Overflow
See other posts from Stack Overflow
or by Alexander
Published on 2012-03-08T11:04:04Z
Indexed on
2012/04/08
11:29 UTC
Read the original article
Hit count: 1011
xcode
|pdf-generation
I'm trying to create a PDF Object from binary XString in xCode. (OData from SAP, utf-8)
Here is the coding:
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;
temp1 is a XString length1 is the length of PDF file in bytes.
I get following error message:
failed to find PDF header: '%PDF' not found
Some ideas? Thanks!
© Stack Overflow or respective owner