Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

MBS Xojo Plugin Tutorial Videos

Letter Source

Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete

// Event implementations
Sub Open()
dim pdf as new MyDynaPDF
dim outfile as FolderItem

outfile=GetFolderItem("test.pdf")

call pdf.CreateNewPDF outfile

call pdf.OpenImportFile GetFolderItem("letter.pdf"), pdf.kptOpen, ""

pdf.template=pdf.ImportPage(1)

call pdf.SetPageCoords pdf.kpcTopDown

call pdf.append

call pdf.PlaceTemplate pdf.template, 0, 0, pdf.GetPageWidth, pdf.GetPageHeight

call pdf.SetFont "Times", pdf.kfsNone, 14, true, pdf.kcp1252
call pdf.SetTextRect 130,240,pdf.GetPageWidth-180,pdf.GetPageHeight-350
call pdf.WriteFText pdf.ktaJustify, window1.EditField1.Text

call pdf.EndPage
call pdf.CloseFile

outfile.Launch true

quit


End Sub
End Class

Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance
End Class

Class MyDynaPDF
Inherits DynaPDFMBS
// Properties
Dim template As Integer



// Event implementations
Function Error(ErrorCode as integer, ErrorMessage as string, ErrorType as integer) As integer
MsgBox ErrorMessage

End Function
Function PageBreak(LastPosX as double, LastPosY as double, PageBreak as boolean) As integer
call EndPage
call append
call SetPageCoords kpcTopDown
call PlaceTemplate template, 0,0, GetPageWidth, GetPageHeight

Return 0
End Function
End Class


All movies




Links
MBS Xojo PDF Plugins