1

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.

posha
  • 881
  • 4
  • 16
  • 28

2 Answers2

2

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];
Ali Abbas
  • 4,247
  • 1
  • 22
  • 40
  • Yp i have this reader, i'm currently using this to read pdf's. Is it possible to read while its downloading? – posha Mar 26 '14 at 01:36
  • 1
    Yes. Using a large PDF file, you can see that you can directly start sliding pages. But, if you slide too fast, the scroll is blocked until the next page charges – Ali Abbas Mar 26 '14 at 08:12
  • i tried with 25mb and 260 mb file. But didn't work. Whats wrong. i gave the file copying path to the reader. it looks like the file is not copied there until the pdf fully downloads. Any idea? – posha Mar 26 '14 at 10:00
  • Can you try to put the pdf file in the application ? – Ali Abbas Mar 27 '14 at 08:07
  • Yp when the pdf is in the app it will load. But i want is to read the pdf while its downloading. – posha Mar 27 '14 at 09:05
  • Can you try to load your pdf file in a web view ? I edited my answer – Ali Abbas Mar 27 '14 at 09:28
  • Yp i can, but then how can i add features provided by the reader app. – posha Mar 27 '14 at 09:34
  • What kind of features do you need ? UIWebview Inherits from UIView so you can add some buttons, label, etc.. – Ali Abbas Mar 27 '14 at 10:17
  • @posha did you got your solution or not for showing pdf while downloading . If Found let me know how do you do that. I have to also do similar task – Sunil kr singh Aug 31 '17 at 06:32
  • @Sunilkrsingh , please check my answer, I solved my problem by keeping my large pdf as splited pdf files. – posha Sep 04 '17 at 06:45
  • @posha can you provide some sample code that how do you do ? I am new that's why i am unable to understand where do i start . Thanks for ur help – Sunil kr singh Sep 04 '17 at 07:33
0

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.

posha
  • 881
  • 4
  • 16
  • 28