B4J Question ShowExternalDocument with HTM Files

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

I have a HTM file which is displayed using "ShowExternalDocument"

B4X:
Sub Help_action
   fx.ShowExternalDocument(File.GetUri(DataFolder, "helpfile.htm"))
End Sub

This works well with one small issue, graphics don't show.

Bad.jpg


If I open the HTM file directly from FireFox the graphics show correctly.

Good.jpg


Has anyone experienced this and possibly a cure?

Regards Roger
 
Last edited:

eurojam

Well-Known Member
Licensed User
Longtime User
Hi Roger,
I would suggest to embedd the graphics into your HTML document as base64 encoded strings.
something like:
B4X:
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
https://www.base64-image.de/

best
stefan
 
Upvote 0

eurojam

Well-Known Member
Licensed User
Longtime User
May be you should consider PDF file as an alternative
B4X:
fx.ShowExternalDocument(File.GetUri(DataFolder, "helpfile.pdf"))
 
Upvote 0

eurojam

Well-Known Member
Licensed User
Longtime User
Thanks Roger,
your example came to the right moment, because I started today work on the help section of my B4J App...

stefan
 
Upvote 0
Top