brentnycum / BNHtmlPdfKit

Easily turn HTML data from an HTML string or URL into a PDF file on iOS
MIT License
270 stars 62 forks source link

Web view delegates not being called #6

Closed MaxHasADHD closed 10 years ago

MaxHasADHD commented 10 years ago

I put breakpoints into the web view delegate and added webViewDidStartLoad and nothing is being called for some reason. heres my code.

NSString documentDirectory = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"google.pdf"]; BNHtmlPdfKit pdfKit = [BNHtmlPdfKit saveUrlAsPdf:webView.request.URL toFile:documentDirectory pageSize:BNPageSizeA4 success:^(NSString filename) { NSLog(@"Saved PDF"); } failure:^(NSError error) { NSLog(@"Faield to save with error: %@",error); }];

zanekellogg commented 10 years ago

Hi Max,

What was your resolution? I've having the same issue.

Thanks!

MaxHasADHD commented 10 years ago

I don't think I had one, hmmm. I was adding support in my app to save web page to PDF, It may be working but i commented it out for now. I think i changed some lines of code from a long time ago.

zanekellogg commented 10 years ago

Ok thanks Max. I appreciate the response.

On Sun, Aug 17, 2014 at 11:59 PM, Maximilian Litteral < notifications@github.com> wrote:

I don't think I had one, hmmm. I was adding support in my app to save web page to PDF, It may be working but i commented it out for now. I think i changed some lines of code from a long time ago.

— Reply to this email directly or view it on GitHub https://github.com/brentnycum/BNHtmlPdfKit/issues/6#issuecomment-52452312 .

arodeus commented 9 years ago

Hi, same problem here... any solution?

zanekellogg commented 9 years ago

It seems like it's all related to retaining the reference. See SO: http://stackoverflow.com/questions/24338560/bnhtmlpdfkit-code-not-doing-anything-on-ios