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

MBS Xojo Plugin Tutorial Videos

CombinePDFs Source

Note: The function DesktopFolder is deprecated in Xojo. You can replace it with SpecialFolder.desktop.

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 f as FolderItem
dim pagecount as integer

f=DesktopFolder.Child("test.pdf")

call pdf.CreateNewPDF(f)

call pdf.SetDocInfo pdf.kdiSubject, "Just a test pdf"
call pdf.SetDocInfo pdf.kdiProducer, "REALbasic"
call pdf.SetDocInfo pdf.kdiTitle, "The document title"

call pdf.SetImportFlags(Bitwiseor(pdf.kifImportAsPage, pdf.kifImportAll))

f=DesktopFolder.Child("letter.pdf")

call pdf.OpenImportFile(f, pdf.kptOpen,"")

pagecount=pdf.ImportPDFFile(1,1.0, 1.0)

MsgBox "Our document now has "+str(pagecount)+" pages."

call pdf.CloseImportFile

f=DesktopFolder.Child("Newsletter.pdf")

call pdf.OpenImportFile(f, pdf.kptOpen,"")

pagecount=pdf.ImportPDFFile(2,1.0, 1.0)

MsgBox "Our document now has "+str(pagecount)+" pages."

call pdf.CloseImportFile

call pdf.CloseFile



End Sub
End Class

Class Window1
Inherits Window
End Class

Class MyDynaPDF
Inherits DynaPDFMBS
// Event implementations
Function Error(ErrorCode as integer, ErrorMessage as string, ErrorType as integer) As integer
MsgBox str(ErrorCode)+": "+ErrorMessage
End Function
End Class


All movies




Links
MBS Xojo Plugins