MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

class GhostScriptMBS
class, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: A class to run the open source ghostscript library in a REALbasic application.
GhostScriptMBS.Close
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources of this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)
GhostScriptMBS.Copyright as String
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The copyright string of the Ghostscript library.
Notes: (Read only property)
GhostScriptMBS.GSDeleteInstance
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Destroy an instance of Ghostscript.
Notes: Before you call this, Ghostscript must have finished. If Ghostscript has been initialised, you must call GSExit before GSDeleteInstance.
GhostScriptMBS.GSExit as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Exit the interpreter.
Notes: This must be called on shutdown if GSInit() has been called, and just before GSDeleteInstance().
GhostScriptMBS.GSInit(parameters() as string) as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Initialise the interpreter.
Notes:
Pass an array of parameter things. String must have the needed encoding (no UTF16).

Error codes for all GS* functions:

0No errors
e_Quit"quit" has been executed. This is not an error. GSExit() must be called next.
e_NeedInputMore input is needed by GSRunStringContinue(). This is not an error.
e_Info"gs -h" has been executed. This is not an error. GSExit() must be called next.
< 0Error
<= -100 Fatal error. GSExit() must be called next.

see ierrors.h from Ghostscript for more details on the error codes.
GhostScriptMBS.GSNew as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Create a new instance of Ghostscript.
Notes:
This instance is passed to most other GS* functions.
At this stage, Ghostscript supports only one instance.

Please do not use RunParams together with the GS* functions.
GS* functions work on a lower level.

Handle is set.
GhostScriptMBS.GSRunString(data as string, UserErrors as integer, byref ExitCode as integer) as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Runs data through the interpreter.
Notes:
If this function returns <= -100, either quit or a fatal error has occured. You must call GSExit() next. The only exception is GSRunStringContinue() which will return e_NeedInput (-106) if all is well.
There is a 64 KB length limit on any buffer submitted to a gsapi_run_* function for processing. If you have more than 65535 bytes of input then you must split it into smaller pieces and submit each in a separate GSRunStringContinue() call.
GhostScriptMBS.GSRunStringBegin(UserErrors as integer, byref ExitCode as integer) as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Runs data through the interpreter.
Notes:
If this function returns <= -100, either quit or a fatal error has occured. You must call GSExit() next. The only exception is GSRunStringContinue() which will return e_NeedInput (-106) if all is well.
There is a 64 KB length limit on any buffer submitted to a gsapi_run_* function for processing. If you have more than 65535 bytes of input then you must split it into smaller pieces and submit each in a separate GSRunStringContinue() call.
GhostScriptMBS.GSRunStringContinue(data as string, UserErrors as integer, byref ExitCode as integer) as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Runs data through the interpreter.
Notes:
If this function returns <= -100, either quit or a fatal error has occured. You must call GSExit() next. The only exception is GSRunStringContinue() which will return e_NeedInput (-106) if all is well.
There is a 64 KB length limit on any buffer submitted to a gsapi_run_* function for processing. If you have more than 65535 bytes of input then you must split it into smaller pieces and submit each in a separate GSRunStringContinue() call.
GhostScriptMBS.GSRunStringEnd(UserErrors as integer, byref ExitCode as integer) as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Runs data through the interpreter.
Notes:
If this function returns <= -100, either quit or a fatal error has occured. You must call GSExit() next. The only exception is GSRunStringContinue() which will return e_NeedInput (-106) if all is well.
There is a 64 KB length limit on any buffer submitted to a gsapi_run_* function for processing. If you have more than 65535 bytes of input then you must split it into smaller pieces and submit each in a separate GSRunStringContinue() call.
GhostScriptMBS.Input(byref s as string) as integer
event, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Read something for the library.
Notes: Return 0 for Endoffile and -1 for error.
GhostScriptMBS.InstanceHandle as Integer
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.4, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The handle.
Notes:
Used internally for the functions GSExit, GSRunStringEnd, GSNew, GSInit, GSRunStringContinue, GSRunStringBegin, GSRunString and GSDeleteInstance.
(Read only property)
GhostScriptMBS.LibraryHandle as Integer
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The handle of the loaded shared library.
Notes: (Read only property)
GhostScriptMBS.LoadAPICodeFragment(libname as string)
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Loads the shared library.
Notes:
Libname is the internal cfrg name.
Only for CFM shared libraries.
GhostScriptMBS.LoadAPIdll(libname as string)
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 8.1, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Loads the shared library.
Notes: Only for Windows DLLs.
GhostScriptMBS.LoadAPIframework(libaryfile as folderitem)
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Loads the shared library.
Example:
g.LoadAPIframework getfolderitem("Ghostscript.framework")

Notes: Only for frameworks on Mac OS X.
GhostScriptMBS.LoadAPIlibrary(libname as string)
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 8.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Works, Feedback.

Function: Loads the shared library.
Notes: Only for Linux .so files or Mac OS X .dylib files.
GhostScriptMBS.LoadError as Integer
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The error code from loading the shared library.
Notes:
0 if no error.
(Read and Write property)
GhostScriptMBS.LoadErrorString as String
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The error message.
Notes:
If loading of the shared library fails on a Mac an error message is stored in this string.
(Read and Write property)
GhostScriptMBS.Output(s as string) as integer
event, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The library has something to output.
Notes: Return lenb(s) to tell the library how much you have written.
GhostScriptMBS.OutputError(s as string) as integer
event, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The library has something to output on the error channel.
Notes: Return lenb(s) to tell the library how much you have written.
GhostScriptMBS.Product as String
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The product string of the Ghostscript library.
Notes: (Read only property)
GhostScriptMBS.Revision as Integer
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The revision of the Ghostscript library.
Example:
msgbox str(Revision) // e.g. "850"

Notes: (Read only property)
GhostScriptMBS.RevisionDate as Integer
property, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The revision date of the Ghostscript library.
Example:
msgbox format(RevisionDate,"0") // e.g. "20041220"

Notes: (Read only property)
GhostScriptMBS.RunParams(parameters() as string, runstring as string) as integer
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 5.0, Mac OS X: Does nothing, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Runs the ghostscript engine.
Notes:
runstring can be empty.
Returns an error code:
0 - success
1 - error, shared library was not loaded
or one of the Ghostscript error codes.
GhostScriptMBS.UnloadAPI
method, Ghostscript, MBS PDF Plugin (Ghostscript), class GhostScriptMBS, Plugin version: 6.4, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Unloads the shared library.
Notes:
Reverses what LoadAPI does.
So if you loaded a ghostscript dll file, this file will be unloaded and the file closed.

In special cases you may need to force a reset of the ghostscript library by unloading it and loading it later again.

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