Вопрос

I'am developing a newsstand application and i want to read the content of the pdf while its downloading. Currently the user has to wait until the pdf downloads to read it. In some newsstand apps i have seen the users can read while the pdf pages are downloading.

I just want to know from where do i start. It would be great if anyone could guid me on this.

Это было полезно?

Решение 2

I solved my problem by keeping my large pdf as splited pdf files. Then download the pdf to the iphone and combined the pdf files i downloaded.

So until the next pdf downloads user can read the downloaded pdf.Once the other pdf is downloaded the new part is combined to the first pdf to create a new pdf. Thanks.

Другие советы

I found this library : https://github.com/vfr/Reader and i tested it with a big pdf file (Very large PDF-files) so i think that's what are you searching for.

There are some interesting options so you can enable or disable some buttons or some visual effects

Edit : Using web view to load Pdf File

You can also use a web view to load the pdf file. To do that :

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(x,x,x,x)];

NSURL *targetURL = [NSURL URLWithString:@"http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/UIWebView_Class.pdf"];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[webView loadRequest:request];
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top