I have 22 lines of text and i want to create a pdf file with 3 pages and print lines them so each page can have 10 lines and the last page will have 2 remain lines can you help? Thanks
First line must have 10 lines
Second must have 10 lines
and the last page 2 remain lines
B4X:
For i = 0 To totalPagesToCreate - 1
pdfDoc.StartPage(595, 842)
pdfDoc.Canvas.DrawText("New line of text", 40, (i * intSpacing) + 20, Typeface.SANS_SERIF, 14 / GetDeviceLayoutValues.Scale , Colors.Black, "LEFT")
pdfDoc.FinishPage
End If
For P=1 To NumberOfPages
CreatePage
Next
Sub CreatePage
Dim yPos as Int = 0
pdfDoc.StartPage(595, 842)
For L=1 To NumberOFLines
GetTheLine
PrintIt at yPos
Add Spacing to yPos
Next
pdfDoc.FinishPage
End Sub
My problem is that i want to print in first page the line 1 and line 2 and in second page the line 3 and line 4 . I dont want to print all lines in every page Thanks