Android Question How to Implement Table View in PDF Document ?

Pravee7094

Active Member
Hello All,
I used below library to create PDF Document.

But I can't implement table view in the PDF Creation. If we create html table as string and load it to below event,
pdf.Canvas.DrawText(...)
It Only return the text format, Not table format.

I think we just implement the Html table view in "Printer" Type. (EX : printer.PrintHtml("job", tableString))
But I want table view in PDF document.

Any suggestion ? Any other resources?

Thanks
 

Pravee7094

Active Member
Which table view are you speaking of?
Any table view. Ex: html table or b4x table view

Example html table view coding:
B4X:
    Dim tableString As String = $"
<!DOCTYPE html>
<html>
<style>
table, th, td {
  border:1px solid black;
}
</style>
<body>

<table style="width:100%">
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
</table>

</body>
</html>"$
 
Upvote 0

Pravee7094

Active Member
Thanks for your response.

When we have more than 10 columns, some columns are hiding on Right side(Horizontal scrollview B4x table). So we can snapshot the only visible screen. Remaining columns are not covered. So, this example not suitable for me.:confused:

Any other ?

Thanks
 
Upvote 0
Top