Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/DynaPDF/Create PDF console
Function:
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 Sun, 23th Sep 2017.
Project "Create PDF console.rbp"
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.kcp1252 call pdf.WriteFText pdf.ktaCenter, "My first Xojo output!" call pdf.SetFont "Times", pdf.kfsItalic, 20.0, true, pdf.kcp1252 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:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS DynaPDF Plugin.




Links
MBS Xojo Plugins