Hello,
I have a question about the text editor from the example: HTMLEditorWrapper
Well, if you want to print the entire text (see: ScreenShot_0.png) on an A4 sheet,
I only get a fragment of the text printout (ScreenShot_1.png).
I checked the printer parameters, but nothing seems to be wrong
setting, such as multi-page 4 in 1 printing.
I print using the function below,
where "PrintOut" is the content of the text to be printed:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Thank you in advance for your help in explaining how to actually print in A4 format, the entire content of the text.
			
			I have a question about the text editor from the example: HTMLEditorWrapper
Well, if you want to print the entire text (see: ScreenShot_0.png) on an A4 sheet,
I only get a fragment of the text printout (ScreenShot_1.png).
I checked the printer parameters, but nothing seems to be wrong
setting, such as multi-page 4 in 1 printing.
I print using the function below,
where "PrintOut" is the content of the text to be printed:
			
				PrintToJobRun:
			
		
		
		Public Sub PrintToJobRun(Job As Object, PrintOut As String) As ResumableSub
    Dim WebV As B4XView = HTMLEditor1.As(JavaObject).RunMethod("lookup",Array("WebView"))
    If WebV.IsInitialized Then       
'
'        May be needed to hide the caret, I've seen it once or twice on prints
'        PRINTOUT of formatted text in HtmlText. (don't do anything!)
'
        Dim OrigHTML As String = HTMLEditor1.HtmlText
        HTMLEditor1.HtmlText = PrintOut
        
        Dim JS As JavaObject
        JS.InitializeStatic("org.jsoup.Jsoup")
        Dim Doc As JavaObject = JS.RunMethod("parse", Array(HTMLEditor1.HtmlText))
        
        Dim Body As JavaObject = Doc.RunMethod("body",Null)
        Dim PropStr As String = Body.RunMethod("attr",Array("style"))
        Body.RunMethod("attr",Array("style","caret-color:transparent;" & PropStr))
        
        Dim WebE As JavaObject = WebV.As(JavaObject).RunMethodJO("getEngine",Null)
        WebE.RunMethod("print",Array(Job))
        Sleep(50)
'
'        Unhide the caret
'
        HTMLEditor1.HtmlText = OrigHTML
        HERequestFocus
        Return True
    Else
        Return False
    End If
End SubThank you in advance for your help in explaining how to actually print in A4 format, the entire content of the text.
 
				 
 
		 
			 
			 
 
		 
 
		 
					
				 
 
		 
			 
			 
			 
			 
			 
			 
 
		