Open local PDF on iOS


I am hoping this question has a very simple answer.

I am trying to open a local PDF on iOS only using the following:

<a class="item" href="#" onclick="'/pdf/Venue_Event_Plan.pdf', '_blank', 'location=no', 'EnableViewPortScale=yes', 'closebuttoncaption=Return'); return false;">
    Open PDF

It opens up the inappbrowser window but it is blank. I can open web links with no problems but not PDFs even if they are web based.

I get the following error in the iOS simulator:
webView:didFailLoadWithError - -1003: A server with the specified hostname could not be found.

thanks in advance Mark

Are you sure this location is correct?

Remember, relative links are the safest route.

Yes I think so @Gajotres, it is sitting in a pdf folder within the www folder.

Why don’t you try using relative links?

For example:




until you reach your pdf directory

1 Like

@Gajotres thank you very much thats all I needed. I was using two . instead of one.

Many thanks again for such a quick response

1 Like

I’m glad to be of help :slight_smile:

Hi, does this work for android too?