B4J Question My App opens PDF in Debug but not in Release mode

tsteward

Well-Known Member
Licensed User
Longtime User
Can anyone advise how I fix this.
My B4J app runs the following code and in Debug mode it loads up the pdf but in release mode it does not.

Debug mode
ManualUri = file:/C:/Users/locki/Documents/MIAKeying/B4J/Files/MIA%20User%20Manual%200.2.6.pdf

In Release mode
ManualUri = jar:file:/C:/Users/locki/Documents/MIAKeying/B4J/Objects/MIAKeying.jar!/Files/MIA%20User%20Manual%200.2.6.pdf


B4X:
Dim ManualUri As String = File.GetUri(File.DirAssets, "MIA User Manual 0.2.6.pdf")
                Log(ManualUri)
                fx.ShowExternalDocument(ManualUri)
 

hatzisn

Expert
Licensed User
Longtime User
why don't you just put this:

B4X:
Dim ManualUri As String = File.Combine(File.DirAssets, "MIA User Manual 0.2.6.pdf")

This might not work because it is in File.DirAssets which is inside the jar. You might consider copying from DirAssets to an other Folder.
 
Last edited:
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
why don't you just put this:

B4X:
Dim ManualUri As String = File.Combine(File.DirAssets, "MIA User Manual 0.2.6.pdf")

This might not work because it is in File.DirAssets which is inside the jar. You might consider copying from DirAssets to an other Folder.
Copying to another folder was the solution. I thought assets were read only nut accessible. It seems not.
 
Upvote 0
Top