Hello,
I'm trying to print a webpage to a local printer via intent. (wifi ofcourse)
This webpage is created from records in a SQLITe database.
To print, I use Intent Action_Sent.
For pages smaller then, let's say 85Kb, this works nicely.
However above the 85k either my program crashes and disappears from the screen or it does not show the app's which can be used to share the page (to my print app) when I press the share button in my program.
When debugging I get no errorr.
Perhaps this is some buffer issue?
My code snippet:
I'm printing the content of an edittext (html layout) which is created during quering the SQLITE database.
When finished, the Webview is filled with the content of the EditText content.
I also create an HTML file so it can be reloaded if the user want's the same page again.
(So perhaps even a html file print form my program can be an option)
I also tried streaming a file, but can't seem to get anything streamed, so still 'no cigar'
I've tried to find the options etc for intent on B4A, but can't seem to find anything sensible about it.
Searching the web, there are examples for Java.
But as i'm starting in B4A and not being a Java programmer, I don't know how to convert the intent syntax from Java to B4a.
This is why I whent for B4A ofcourse
Can anybody provide some solution?
Thanks
I'm trying to print a webpage to a local printer via intent. (wifi ofcourse)
This webpage is created from records in a SQLITe database.
To print, I use Intent Action_Sent.
For pages smaller then, let's say 85Kb, this works nicely.
However above the 85k either my program crashes and disappears from the screen or it does not show the app's which can be used to share the page (to my print app) when I press the share button in my program.
When debugging I get no errorr.
Perhaps this is some buffer issue?
My code snippet:
B4X:
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_SEND, "")
Intent1.SetType("text/html")
Intent1.PutExtra("android.intent.extra.TEXT", edtReportingHtmlText.Text)
Intent1.WrapAsIntentChooser("Choose")
StartActivity(Intent1)
I'm printing the content of an edittext (html layout) which is created during quering the SQLITE database.
When finished, the Webview is filled with the content of the EditText content.
I also create an HTML file so it can be reloaded if the user want's the same page again.
(So perhaps even a html file print form my program can be an option)
I also tried streaming a file, but can't seem to get anything streamed, so still 'no cigar'
I've tried to find the options etc for intent on B4A, but can't seem to find anything sensible about it.
Searching the web, there are examples for Java.
But as i'm starting in B4A and not being a Java programmer, I don't know how to convert the intent syntax from Java to B4a.
This is why I whent for B4A ofcourse
Can anybody provide some solution?
Thanks