B4J Question QR Code Generator (for Server)

Hi All,

I am trying to implement a QR code generator on the server side, I am using the library from @tchart in the link below:
https://www.b4x.com/android/forum/threads/qr-code-generator-for-server.125513/

I am using EncodeTextToPNG as I want to have an image that I can insert into a PDF but I am getting an error: javax.imageio.IIOException: Can't create an ImageOutputStream!

Below is the line of code that is creating the error.
B4X:
qr.EncodeTextToPNG(TheqrImage,File.DirApp & DownloadFolder,SignaturAgent)

Is there something that I am doing wrong

Kind Regards Christopher
 
I found out the problem, I had not created the folder that the
qr.EncodeTextToPNG(TheqrImage,File.DirApp & DownloadFolder,SignaturAgent)
I found out the problem, I had not made the folder that the File.DirApp & DownloadFolder was set too!! The ImageOutputStream had nothing to write @tchart 's library works so nicely. I appreciate all the quick replies to help.
 
Upvote 0

tchart

Well-Known Member
Licensed User
Longtime User
What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps.
That’s my guess too. Where are you writing to? Seems like it could be read only.
 
Upvote 0
That’s my guess too. Where are you writing to? Seems like it could be read only.
Thank you I did manage to sort it out, below is what happened. Thanks again
I found out the problem, I had not made the folder that the File.DirApp & DownloadFolder was set too!! The ImageOutputStream had nothing to write @tchart 's library works so nicely. I appreciate all the quick replies to help.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…