Folder for PDF files


#1

In my application I have put an HTMLview to view useful PDF files for the user of the application, and that works OK.
But I would need the user to be able to change those pdf files for others I prefer, so I will need local storage.
So: how can I indicate a folder on the device where the user copies their pdf, and the application can visualize them?
Is a database with PDF files possible?

Any possible solution?
Thank you


#2

Do you want your apps to save the pdfs in the local device’s file system? You won’t be able to do that - web apps are not allowed to make changes to the file system. (This is a good idea - malicious web apps would otherwise be possible). You can save files using PhoneGap.

Otherwise, you will need to save the pdf files in localStorage.


#3

But is the app capable of reading a file from the mobile SD card?
That would be enough, since the user would record the PDF with the mobile system, in Documents, for example.


#4

Hi there… is this a web, or standalone or telephone application?


#5

204/5000
Standalone.
It is an engineering application, in which pdf is consulted with equipment data.
I would need to be able to read pfd files from the documents folder, or downloads, or the SD card.
All forbidden?


#6

564/5000
After reading about the phonegap plugin file, I can now access the sd card with

   fileName = "Eden.pdf"
   folder = cordova.file.externalRootDirectory & fileName
   HTMLview1.innerHTML = "<iframe src = '" & folder & "' width = 360 height = 440> </ iframe>"
   HTMLview1.refresh ()

If the file does not exist, an error appears on the device
file: ///storage/emulated/0/Eden.pdf "

But if it exists on the card, the HTMLview control simply appears blank.
I have tried changing properties such as scroll, height, width, etc. without result.
Everything works perfectly in the browser.

Any idea will be grateful


#7

I can not find a solution to display .PDF files in the HTMLview controls when building a native application with Phonegap.
Deploying in the Browser, or in a local folder, they are perfectly displayed, but when you build APK, a blank box appears on the phone.

Is it a Phonegap or Nsbasic failure?


#8

It’s probably something you need to fix in PhoneGap.

Use the Chrome Remote Debugger to see what error messages are happening.