C ChristopherD Member Sep 29, 2022 #1 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: Copy qr.EncodeTextToPNG(TheqrImage,File.DirApp & DownloadFolder,SignaturAgent) Is there something that I am doing wrong Kind Regards Christopher
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: Copy qr.EncodeTextToPNG(TheqrImage,File.DirApp & DownloadFolder,SignaturAgent) Is there something that I am doing wrong Kind Regards Christopher
DonManfred Expert Licensed User Longtime User Sep 29, 2022 #2 ChristopherD said: Is there something that I am doing wrong Click to expand... Create a small project showing the problem and upload it. Hard to help with the informations you provided. Upvote 0
ChristopherD said: Is there something that I am doing wrong Click to expand... Create a small project showing the problem and upload it. Hard to help with the informations you provided.
Erel B4X founder Staff member Licensed User Longtime User Sep 29, 2022 #3 What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps. Upvote 0
What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps.
C ChristopherD Member Sep 29, 2022 #4 Erel said: What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps. Click to expand... C:\Work\POSPRO~2\LOANSU~1\Objects but we write to this all the time in our programs Upvote 0
Erel said: What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps. Click to expand... C:\Work\POSPRO~2\LOANSU~1\Objects but we write to this all the time in our programs
C ChristopherD Member Sep 29, 2022 #5 I found out the problem, I had not created the folder that the ChristopherD said: qr.EncodeTextToPNG(TheqrImage,File.DirApp & DownloadFolder,SignaturAgent) Click to expand... 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
I found out the problem, I had not created the folder that the ChristopherD said: qr.EncodeTextToPNG(TheqrImage,File.DirApp & DownloadFolder,SignaturAgent) Click to expand... 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.
tchart Well-Known Member Licensed User Longtime User Sep 29, 2022 #6 Erel said: What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps. Click to expand... That’s my guess too. Where are you writing to? Seems like it could be read only. Upvote 0
Erel said: What is the output of Log(File.DirApp)? You cannot write to this folder in stand alone packaged apps. Click to expand... That’s my guess too. Where are you writing to? Seems like it could be read only.
C ChristopherD Member Sep 30, 2022 #7 tchart said: That’s my guess too. Where are you writing to? Seems like it could be read only. Click to expand... Thank you I did manage to sort it out, below is what happened. Thanks again ChristopherD said: 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. Click to expand... Upvote 0
tchart said: That’s my guess too. Where are you writing to? Seems like it could be read only. Click to expand... Thank you I did manage to sort it out, below is what happened. Thanks again ChristopherD said: 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. Click to expand...