Hi to all,
my app's users are asking a direct print feature in order to print a txt that generate my app.
I think that this feature could be very interesting for many apps.
I have found this document that talk about official "Android Printing Framework" :
http://www.techotopia.com/index.php/Printing_with_the_Android_Printing_Framework
More in detail I think there are two interesting section :
If is not possible, can we use the "Simple Library Compiler" to use the java code show in the attached article ?
P.S.
For the Web printing method the sample java code is the following :
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
* this function should be called within the "PageFinished" event of a webview.
			
			my app's users are asking a direct print feature in order to print a txt that generate my app.
I think that this feature could be very interesting for many apps.
I have found this document that talk about official "Android Printing Framework" :
http://www.techotopia.com/index.php/Printing_with_the_Android_Printing_Framework
More in detail I think there are two interesting section :
- Creating and Printing HTML Content (Easy)- To enable HTML printing, the WebView class has been extended in Android 4.4 to include support for printing with minimal coding requirements.
 
- Printing a Custom Document (more complicated)
If is not possible, can we use the "Simple Library Compiler" to use the java code show in the attached article ?
P.S.
For the Web printing method the sample java code is the following :
			
				B4X:
			
		
		
		private void createWebPrintJob(WebView webView) {
PrintManager printManager = (PrintManager) this
.getSystemService(Context.PRINT_SERVICE);
PrintDocumentAdapter printAdapter =
webView.createPrintDocumentAdapter();
String jobName = getString(R.string.app_name) + " Document";
PrintJob printJob = printManager.print(jobName, printAdapter,
new PrintAttributes.Builder().build());
}* this function should be called within the "PageFinished" event of a webview.
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		