English 中文(简体)
未能找到国防军的头盔:找不到的PDF
原标题:failed to find PDF header: %PDF not found

I am trying to download pdf content from webservice endpoint which is coming as binary. After decoding into base64 I am attaching the decoded file to webview, in which failed to find pdf header error is displaying.

是否有任何人知道我如何着手纠正这一错误? 我在此没有采取任何步骤?

感谢。

问题回答

添加类似内容

NSData *dataContent; // response data.
CFDataRef myPDFData;
myPDFData = (CFDataRef)dataContent;
CGDataProviderRef provider = CGDataProviderCreateWithCFData(myPDFData);

pdfDocument = CGPDFDocumentCreateWithProvider(provider);

CGDataProviderRelease(provider);

然后,将pdfDocument装入你的网页。

或研究如何形成习惯的索姆人民抵抗力量的意见。 页: 1 也就是说,我做些什么,就把pdf文件正确地装到网上。

我在提出我对“......”的看法时有这种错误。 问题是,“人民抵抗力量”在你要求的时候就没有了。 正在退还的双元数据是贵国网络服务局发出的错误答复。 例如,如果我请求在以下网址上填写一份pdf文件:

如果该文件在地址上确实存在,那么我会收到错误的答复,这就是复发的双元数据。

here is the solution if you use the SAP web service: in SAP System there is a method to convert the binary data (XSTRING) to Base64: cl_http_utility=>encode_x_base64 Using http it is possible to transfer the Base64 data. In xcode I used this library: a link

// 3) Decode Base 64
// Then you can put that back like this
NSData  *b64DecData = [Base64 decode:b64EncStr];

然后:[webDisplayloadData:b64Dec Data MIMEType:@“application/pdf” textEncodingName:@“utf-8” baseURL:nil];





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签