Dim pdf As PdfDocument
pdf.Initialize
pdf.StartPage(595, 842) 'A4 size
pdf.Canvas.DrawLine(2, 2, 593 , 840, Colors.Blue, 4)
pdf.Canvas.DrawText("Hello", 100, 100, Typeface.DEFAULT_BOLD, 30 / GetDeviceLayoutValues.Scale , Colors.Yellow, "CENTER")
pdf.FinishPage
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "1.pdf", False)
pdf.WriteToStream(out)
out.Close
pdf.Close