PDF's incorrectly referenced in Javascript

I use an LMS platform to create curriculum / handbook material. I export it as a web only file and wrap it using Phonegap Build. Once the app is downloaded, all of the assets are then local to that device. Here is a sample repository that would be used to pull from via PGB.

The linked repository contains PDF documents that were originally added as attachments in the LMS platform. When I open the app on an Android device, everything works except the PDFs. They do not open at all. On iOS, the PDF’s open but there is no UI to get out of the PDF and back to the app. I have tried using Inappbrowser as well as document-viewer cordova plugins to try to get these PDF’s to work properly, but I think I am missing something. My knowledge of code is limited but I’ve made it this far and am determined to get it to work.

I know there is supposed to be some kind of deviceready function added somewhere, and the PDF’s should be referenced in the code properly. I am thinking that because the LMS platform is limited to only adding PDF’s via attachment, it results in the PDFs being referenced in the code in a way that the plugin’s I’ve tried using do not understand.  I cannot figure out what code needs to be replaced to properly reference these PDF’s to open with a cordova plugin such as Inappbrowser. I know the code that needs to be used, I just can’t find what it needs to replace.

Any help on this would be greatly appreciated!

It may be worth mentioning that all of the content in this repo is dummy content. It is not real information, so there is no security concern.

Hi ,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the Project Develpment Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.

Let me know if you have any other questions or if I can help with anything else.


Something close to that issue is here. I tried to implement so in a fashion like it was made here with JS https://w9.pdffiller.com and yes, I’m some sort of new-new to this thing at all, but it seemed to be not so challenging as long as what a great number of materials on that is there over stackoverflow and else. But nevertheless, when I’m trying to open some PDF or Word file with OCR it fails to layout and I actually have no clue what this all about