Platforms to show: All Mac Windows Linux Cross-Platform

/DynaPDF/Create PDF with Exception
Feedback.

Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /DynaPDF/Create PDF with Exception
This example is the version from Thu, 10th Mar 2010.
Notes: Last modified: Thu, 10th Mar 2010
Class App
Inherits Application
// Event implementations
Sub Open()
dim pdf as new DynapdfMBS
dim d as new date

dim f as FolderItem = SpecialFolder.Desktop.Child("Create PDF with Exception.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 Realbasic output"
call pdf.SetDocInfo pdf.kdiProducer, "Realbasic test application"
call pdf.SetDocInfo pdf.kdiTitle, "My first Realbasic output"

// We want to use top-down coordinates
call pdf.SetPageCoords pdf.kpcTopDown

call pdf.Append


dim e as DynapdfErrorExceptionMBS

// set to false to ignore!
'pdf.RaiseException=false

// using a bad font name will raise an exception here:

call pdf.SetFont "Times2", pdf.kfsItalic, 40.0, true, pdf.kcp1252
call pdf.WriteFText pdf.ktaCenter, "My first Realbasic 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

f.Launch

quit

End Sub
End Class


See also:




Links
MBS Realbasic tutorial videos - Pfarrgemeinde Messdiener Nickenich