Platforms to show: All Mac Windows Linux Cross-Platform
/PDFlib/pdflib7 hello
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /PDFlib/pdflib7 hello
This example is the version from Fri, 25th Feb 2010.
Notes: Last modified: Fri, 25th Feb 2010
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /PDFlib/pdflib7 hello
This example is the version from Fri, 25th Feb 2010.
Notes: Last modified: Fri, 25th Feb 2010
Class App
Inherits Application
// Event implementations
Sub Open()
dim p as PDFLib7MBS
dim n as integer
dim fonthandle as integer
dim f as folderItem
dim filename as String
if not PDFLib7MBS.APIloaded then
MsgBox "API must be in plugin!?"
quit
end if
p=new PDFLib7MBS
filename="hello "+p.PluginName+".pdf"
f=GetFolderItem(filename)
n=p.BeginDocument(f,"")
if n<0 then
msgBox "Error: couldn't open PDF file."
quit
else
p.setinfo "Creator","Realbasic test application"
p.setinfo "Author", "Christian Schmitz"
p.setinfo "Title","Hello World (RB)"
p.beginPage 500,500
fonthandle=p.FindFont("Helvetica-Bold","host",0)
p.setfont fonthandle,24
p.settextpos 50,400
p.show "Hello World!"
p.continueText "(says Realbasic)"
p.continueText "PDFlib: "+str(p.GetValue("major",0))+"."+str(p.GetValue("minor",0))+"."+str(p.GetValue("revision",0))
p.continueText p.pluginname
p.endpage
// second page with a lot of fonts...
p.beginPage 500,500
fonthandle=p.FindFont("Helvetica-Bold","host",0)
p.setfont fonthandle,24
p.settextpos 50,400
p.show "Hello World!"
p.continueText "(says Realbasic)"
fonthandle=p.FindFont("Helvetica","host",0)
p.setfont fonthandle,14
p.settextpos 50,220
p.show "Helvetica"
fonthandle=p.FindFont("Helvetica-Bold","host",0)
p.setfont fonthandle,14
p.settextpos 50,200
p.show "Helvetica-Bold"
fonthandle=p.FindFont("Helvetica-Oblique","host",0)
p.setfont fonthandle,14
p.settextpos 50,180
p.show "Helvetica-Oblique"
p.endpage
p.EndDocument ""
f=GetFolderItem(filename)
f.Launch
end if
quit
Exception ex as PDFLib7ExceptionMBS
MsgBox "PDF Lib Exception: "+ex.ErrorMessage+" ("+str(ex.ErrorNumber)+", "+ex.FunctionName+")"
quit
End Sub
End Class
Links
MBS Realbasic Plugins - Pfarrgemeinde Ministranten Nickenich