K kps Member Aug 10, 2020 #1 Hello everyone. I saw this thread and tested out the example. Everything works fine. https://www.b4x.com/android/forum/threads/epubreader-webreader.72560/#content I particularly like the Webreader which allows you to increase and decrease the font size. But I am unable to figure out how to use Webreader (without combining it with ePubReader) for opening websites or local html files The LoadUrl method specifies the parameter as "arg() as string" I blindly tried B4A: WbRd.LoadUrl("http://www.homeopoonga.com/") I get this error Webpage not available The webpage at http://www.homeopoonga.com/ could not be loaded because: net::ERR_CACHE_MISS Click to expand... I tried to open a local html file. Webreader shows an empty screen. B4A: File.Copy(File.DirAssets, "trial.html", File.DirInternal, "trial.html") WebViewMode = True SwitchMode 'Switches to the WebReader mode WbRd.LoadUrl(File.Combine(File.DirInternal,"trial.html")) @Syd Wright I saw this post of yours. https://www.b4x.com/android/forum/t...tixs-epubreader-webreader.102663/#post-644170 In the absence of any documentation, how do you people figure out how to use the library ? Can someone post a simple code snippet ? Regards, KPS
Hello everyone. I saw this thread and tested out the example. Everything works fine. https://www.b4x.com/android/forum/threads/epubreader-webreader.72560/#content I particularly like the Webreader which allows you to increase and decrease the font size. But I am unable to figure out how to use Webreader (without combining it with ePubReader) for opening websites or local html files The LoadUrl method specifies the parameter as "arg() as string" I blindly tried B4A: WbRd.LoadUrl("http://www.homeopoonga.com/") I get this error Webpage not available The webpage at http://www.homeopoonga.com/ could not be loaded because: net::ERR_CACHE_MISS Click to expand... I tried to open a local html file. Webreader shows an empty screen. B4A: File.Copy(File.DirAssets, "trial.html", File.DirInternal, "trial.html") WebViewMode = True SwitchMode 'Switches to the WebReader mode WbRd.LoadUrl(File.Combine(File.DirInternal,"trial.html")) @Syd Wright I saw this post of yours. https://www.b4x.com/android/forum/t...tixs-epubreader-webreader.102663/#post-644170 In the absence of any documentation, how do you people figure out how to use the library ? Can someone post a simple code snippet ? Regards, KPS
Erel B4X founder Staff member Licensed User Longtime User Aug 10, 2020 #2 I don't know whether this is the cause of this error however it is worth a try. Add this line to the manifest editor: B4X: CreateResourceFromFile(Macro, Core.NetworkClearText) Upvote 0
I don't know whether this is the cause of this error however it is worth a try. Add this line to the manifest editor: B4X: CreateResourceFromFile(Macro, Core.NetworkClearText)
K kps Member Aug 10, 2020 #3 Erel said: I don't know whether this is the cause of this error however it is worth a try. Add this line to the manifest editor: Click to expand... Success ! The website loaded without any problem. B4A: WbRd.LoadUrl("http://www.homeopoonga.com/") More important ! I could change the font size and the text reflowed ! This was like a dream come true for me. Thanks @Erel. Well, this magic statement seems to be some kind of panacea ! I had mentioned in this thread, how it solved another problem of mine. https://www.b4x.com/android/forum/threads/cant-change-webview-to-desktop-mode.120956/#post-756684 Figured out how to load the local HTML also. B4A: File.Copy(File.DirAssets,"index.html",File.DirInternal,"index.html") WbRd.LoadUrl("file://" & File.Combine(File.DirInternal,"index.html")) @Informatix Thank you for the WebReader Library. I feel so happy. Regards, KPS Last edited: Aug 10, 2020 Upvote 0
Erel said: I don't know whether this is the cause of this error however it is worth a try. Add this line to the manifest editor: Click to expand... Success ! The website loaded without any problem. B4A: WbRd.LoadUrl("http://www.homeopoonga.com/") More important ! I could change the font size and the text reflowed ! This was like a dream come true for me. Thanks @Erel. Well, this magic statement seems to be some kind of panacea ! I had mentioned in this thread, how it solved another problem of mine. https://www.b4x.com/android/forum/threads/cant-change-webview-to-desktop-mode.120956/#post-756684 Figured out how to load the local HTML also. B4A: File.Copy(File.DirAssets,"index.html",File.DirInternal,"index.html") WbRd.LoadUrl("file://" & File.Combine(File.DirInternal,"index.html")) @Informatix Thank you for the WebReader Library. I feel so happy. Regards, KPS