Frequently Asked Question

How to open pdf from url on iOS?
Last Updated 11 months ago

This article shows how to open a pdf from a specific url.

It possible to open a pdf with PDFHTTPStream class in this way:

    RDPDFViewController *pdf = [[RDPDFViewController alloc] initWithNibName:@"RDPDFViewController" bundle:nil];   
    NSString *cachefile = [[NSTemporaryDirectory() stringByAppendingString:@""] stringByAppendingString:@"cache.pdf"];
    PDFHttpStream *stream = [[PDFHttpStream alloc] init];
    [stream open:@"http://pdf_url" :cachefile];
    [pdf PDFOpenStream:stream :@""];
    [self.navigationController pushViewController:pdf animated:YES];

To allow all connection add "App Transport Security Settings" key into info.plist and set "Allow Arbitrary Loads" to YES.


Loading ...