Platforms to show: All Mac Windows Linux Cross-Platform
/DynaPDF/Create PDF console
Function:
Required plugins for this example: MBS DynaPDF Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /DynaPDF/Create PDF console
This example is the version from Wed, 14th Sep 2021.
Function:
Required plugins for this example: MBS DynaPDF Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /DynaPDF/Create PDF console
This example is the version from Wed, 14th Sep 2021.
Project "Create PDF console.xojo_binary_project"
Class App Inherits ConsoleApplication
EventHandler Function Run(args() as String) As Integer
dim pdf as new MyDynapdfMBS
dim d as new date
dim f as FolderItem = SpecialFolder.Desktop.Child("Create PDF.pdf")
pdf.SetLicenseKey "Starter" // For this example you can use a Starter, Lite, Pro or Enterprise License
call pdf.CreateNewPDF f
call pdf.SetDocInfo pdf.kdiSubject, "My first Xojo output"
call pdf.SetDocInfo pdf.kdiProducer, "Xojo test application"
call pdf.SetDocInfo pdf.kdiTitle, "My first Xojo output"
// We want to use top-down coordinates
call pdf.SetPageCoords pdf.kpcTopDown
call pdf.Append
call pdf.SetFont "Times", pdf.kfsItalic, 40.0, true, pdf.kcpUnicode
call pdf.WriteFText pdf.ktaCenter, "My first Xojo output!"
call pdf.SetFont "Times", pdf.kfsItalic, 20.0, true, pdf.kcpUnicode
call pdf.WriteText 50.0, 180.0, "File created: " + d.LongDate
call pdf.EndPage
call pdf.CloseFile
print "OK"
End EventHandler
End Class
Class MyDynaPDFMBS Inherits DynaPDFMBS
EventHandler Function Error(ErrorCode as integer, ErrorMessage as string, ErrorType as integer) As integer
// output all messages on the console:
print str(ErrorCode)+": "+ErrorMessage
Return 0 // ignore
End EventHandler
Property IgnoreWarnings As Boolean
End Class
End Project
See also:
- /DynaPDF/Create numbered pages
- /DynaPDF/Create PDF UA
- /DynaPDF/Create PDF with demo string
- /DynaPDF/Create PDF with paths
- /DynaPDF/Create PDF with Picture file
- /DynaPDF/Create PDF with PictureMBS
- /DynaPDF/Create PDF with Round Rectangles
- /DynaPDF/Create PDF with Signature on Windows
- /DynaPDF/Create PDF with sum form field
- /DynaPDF/Create PDF with transparency
The items on this page are in the following plugins: MBS DynaPDF Plugin.
