B4J Question how tableview to pdf ??

behnam_tr

Member
hi

i see all topics related to this but without success

i want to draw a tableview to pdf file and save that

any on can give me a sample ??
 

Erel

Administrator
Staff member
Licensed User
See the command line arguments: http://www.printhtml.com/index.php

Windows code to find a PDF printer:
B4X:
Sub FindPdfPrinter As ResumableSub
   Dim shl As Shell
   shl.Initialize("shl", "wmic", Array("printer", "get", "Name"))
   shl.Run(-1)
   Wait For shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
   If Success Then
       For Each line As String In Regex.Split("[\r\n]+", StdOut)
           If line.ToLowerCase.Contains("pdf") Then Return line.Trim
       Next
   End If
   Return ""
End Sub
Usage example:
B4X:
Wait For (FindPdfPrinter) Complete (PdfPrinter As String)
If PdfPrinter <> "" Then
 'Now use the name to print with print html
 
Top