hi,
i'm use PDF library to create PDF from Erel post
https://www.b4x.com/android/forum/threads/printing-and-pdf-creation.76712/#content
I need to use a my TypeFace for TXTMultiLine Memo String in PDF
Is this possible?
Thank's
My code is:
i'm use PDF library to create PDF from Erel post
https://www.b4x.com/android/forum/threads/printing-and-pdf-creation.76712/#content
I need to use a my TypeFace for TXTMultiLine Memo String in PDF
Is this possible?
Thank's
My code is:
B4X:
Sub MakePDF
Dim PDF1 As PDFDocument
Dim PDF_PAGEINFO As PageInfo
Dim PDF_RECT As Rect
Dim ptLeft, ptwidth As Int
Dim ptTop, ptHeight As Int
Dim Fsize As Int
ptLeft = 5
ptTop = 5
ptwidth = 200
ptHeight = 50
Fsize = 10 / GetDeviceLayoutValues.Scale
PDF_RECT.Initialize(10,10,595-20,842-20) 'bordo di 10
PDF_PAGEINFO.Initialize(595,842,1,PDF_RECT)
Dim PDF_Page As Page = PDF1.startPage(PDF_PAGEINFO)
Dim Txtmemo As String
Txtmemo = $"
Questo è un esempio di stringa multi riga
${DateTime.Date(DateTime.Now)} ${DateTime.Time(DateTime.Now)}
----------------------------------------------
Riga 1
Riga 2
Riga 3
==============================================
Fine"$
Dim PDF_TextRec As TextRec
PDF_TextRec.Initialize(Txtmemo,ptwidth,822,ptHeight,Colors.DarkGray)
'I NEED HERE to USE a MY Typeface for TextRec Object
' IS this possible??
PDF_TextRec.draw(PDF_Page,0,0)
PDF1.finishPage(PDF_Page)
PDF1.writeTo(File.DirRootExternal,"TestPdfDocument.pdf")
End Sub