• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help App to open HTML links to PDFs on local storage

shmn

Android Enthusiast
Feb 14, 2011
562
333
WA State
I have some various user's manuals that are in the format of an index.html file which has about 500 links that open 500 PDFs that are stored in sub folders. Everything is on a micro SD card in my phone. Chrome says "content" is blocked. I tried HTML viewer apps but they open the html file but won't open the PDFs. Also tried Firefox and Opera and same thing...content blocked.

Anyone have a suggestion? Using Android 9, I believe on Moto Z4.
 
Why are your PDF files only accessible in this way?

Have you tried accessing them directly?

Browsers like you have tried will only try to open links online, not on the device itself.

Have you tried copying the PDF files to a folder of there own and using a PDF file reader?

The one I like is somewhat tricky to get to read from a SD card (I can instruct on this), but it works excellent.

https://f-droid.org/en/packages/org.sufficientlysecure.viewer/
 
  • Like
Reactions: shmn
Upvote 0
Thanks for the reply.

I can open and read the PDFs directly from a file viewer (I use Root Explorer). But their filenames are just numbers so there is no way to find the right file without the HTML links.

I've been using an HTML viewer to look at the actual code to find the file names within the links and then opening them manually but this is a very slow process especially when I'm searching for data that may be in any number of files.

Opening PDFs by clicking on the links would be so much easier if I can figure out how.
 
Upvote 0
Thanks for the suggestion. I've tried these browsers: Chrome, Firefox, Brave, Opera, Puffin, Samsung, Duck Duck Go, Edge, Vivaldi, Naked and Habit. The last one will open a link to PDFs if I manually enter it but it's buggy and kept crashing (it's no longer supported). I'll keep playing with it as it's a good lead. It's actually a cool browser and it's a shame the developers abandoned it.
 
Upvote 0
I got Lightning to kind of work (thanks for the suggestion, puppykickr). It would display index.html which contains links to other HTML pages which then link to the PDFs. Lightning would not link from index.html to the other HTML pages but if I clicked on the sub-pages from Root Explorer (file explorer app...where I set Lightning as default to open HTML files) it would open that page and if I clicked on a link to a PDF it would use the default PDF to open the file. Which is great news. There are only about 2-6 sub-HTML files which have identifiable names so I have no problem opening them from Root Explorer.

However, none of the PDF viewers/readers/editors would open the PDF. It would try and then revert back to the main menu of the PDF app or throw some sort of error. Even though that app could open those PDF files if opened through Root Explorer or from with the PDF app itself. I tried about a dozen PDF apps and none worked.

I tried puppykickr's suggestion of Document Viewer but that didn't work either. Although I do like that app and am keeping it around. Here is the error it threw. Any ideas? I feel like I'm close on this.

aperr.jpg
 
Upvote 0
You have to host your local pdf file to make it open inside your application. Use SimpleHTTPServer for installing a server and run it wherever your pdf file is located. After successfully running the SimpleHTTPServer, you can check it by opening the pdf file inside your web browser.

Thanks for the suggestion. I will give this a try and post the results.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones