Platforms to show: All Mac Windows Linux Cross-Platform

/PDFlib/boxed text
Feedback.

Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /PDFlib/boxed text
This example is the version from Fri, 25th Feb 2010.
Notes: Last modified: Fri, 25th Feb 2010
Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance

// Event implementations
Sub Open()
dim p as PDFLibLiteMBS
dim n as integer
dim fontid as integer
dim f as folderItem
dim s as String
dim i as integer
dim threeCM as Double
dim e as integer

// Draws some text with a box around

s=EditField1.text // encoding must be the font encoding. Best ASCII

p=new PDFLibLiteMBS
p.SetParameter("compatibility", "1.4") // for compatibility to older and newer Acrobat Readers.

f=GetFolderItem("show text boxed using pdflib.pdf")
n=p.openFile(f)
if n<0 then
msgBox "Error: couldn't open PDF file."
else
p.beginPage 500,500
fontid=p.FindFont("Helvetica","host",0)
p.setfont fontid,9

threeCM=3.0/2.54*72.0

i=p.ShowBoxed(s,threeCM,threeCM,4.5/2.54*72.0,350,"left","")

p.Rect threeCM-3,threeCM-3,4.5/2.54*72.0+6,350+6
p.ClosePathStroke

p.endpage
p.close
end if

f.Launch
MsgBox "Done."
quit

Exception ex as PDFLibLiteExceptionMBS
MsgBox "PDF Lib Exception: "+ex.ErrorMessage+" ("+str(ex.ErrorNumber)+", "+ex.FunctionName+")"

End Sub
End Class

Class App
Inherits Application
End Class





Links
MBS Realbasic Chart Plugins - Pfarrgemeinde St. Arnulf Nickenich