let´s say i already have a canvas object which i can use to draw to.
Based on https://www.prepressure.com/library/paper-size/din-a4
i assumed that a Din A4 pagesize should be 595x842 point when generating a PDF-Document. The Canvas for each page i want to write to
I know the canvas has a size of the values above.
my code so far is
This results in a pdf page with a image on it. Great so far...
Image now to have some results in a database and i want to write a "table" based on the databaseresults on this canvas.
I never worked with a canvas honestly said... I´ve no experience in working with it.
How would i go now to draw values from the database result to the canvas in a layout like a table.
Based on https://www.prepressure.com/library/paper-size/din-a4
Dimensions A4 measures 210 × 297 millimeters or 8.27 × 11.69 inches. In PostScript, its dimensions are rounded off to 595 × 842 points.
i assumed that a Din A4 pagesize should be 595x842 point when generating a PDF-Document. The Canvas for each page i want to write to
I know the canvas has a size of the values above.
my code so far is
B4X:
pdf.Initialize("")
Dim info As PageInfo
Dim r As Rect
r.Initialize(0,0,595,842)
info.Initialize(595,842,1,r)
Dim p As Page = pdf.startPage(info)
Dim c As Canvas = p.Canvas
Dim srcrec As Rect
srcrec.Initialize(0,0,ImageView1.Width,ImageView1.Height)
Dim dstrec As Rect
dstrec.Initialize(0,0,ImageView1.Width,ImageView1.Height)
c.DrawBitmap(ImageView1.Bitmap,srcrec,dstrec)
pdf.finishPage(p)
This results in a pdf page with a image on it. Great so far...
Image now to have some results in a database and i want to write a "table" based on the databaseresults on this canvas.
I never worked with a canvas honestly said... I´ve no experience in working with it.
How would i go now to draw values from the database result to the canvas in a layout like a table.