public interface GhostscriptLibrary
extends com.sun.jna.Library
| Modifier and Type | Interface and Description |
|---|---|
static class |
GhostscriptLibrary.display_callback_s
Structure defining display callback functions.
|
static class |
GhostscriptLibrary.gs_main_instance
Pointer holding a native Ghostscript instance.
|
static class |
GhostscriptLibrary.gsapi_revision_s
Structure in charge of holding Ghostscript revision data.
|
static interface |
GhostscriptLibrary.stderr_fn
Callback called to provide a custom error output to Ghostscript. str
holds output characters. len is the length for str.
|
static interface |
GhostscriptLibrary.stdin_fn
Callback called to provide a custom input to Ghostscript. buf is a
pointer to a char array. len is the length of the char array.
|
static interface |
GhostscriptLibrary.stdout_fn
Callback called to provide a custom output to Ghostscript.
|
| Modifier and Type | Field and Description |
|---|---|
static GhostscriptLibrary |
instance
Static instance of the library itself.
|
| Modifier and Type | Method and Description |
|---|---|
void |
gsapi_delete_instance(com.sun.jna.Pointer instance)
Destroy an instance of Ghostscript.
|
int |
gsapi_exit(com.sun.jna.Pointer instance)
Exit the interpreter.
|
int |
gsapi_init_with_args(com.sun.jna.Pointer instance,
int argc,
String[] argv)
Initialise the interpreter.
|
int |
gsapi_new_instance(com.sun.jna.Pointer pinstance,
com.sun.jna.Pointer caller_handle)
Create a new instance of Ghostscript.
|
int |
gsapi_revision(com.sun.jna.Structure pr,
int len)
This function returns the revision numbers and strings of the Ghostscript
interpreter library.
|
int |
gsapi_run_file(com.sun.jna.Pointer instance,
String file_name,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
Send instructions from a file to the Ghostscript interpreter.
|
int |
gsapi_run_string_begin(com.sun.jna.Pointer instance,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
Open an instruction block to the Ghostscript interpreter.
|
int |
gsapi_run_string_continue(com.sun.jna.Pointer instance,
String str,
int length,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
Send instruction to the Ghostscript interpreter.
|
int |
gsapi_run_string_end(com.sun.jna.Pointer instance,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
Close an instruction block to the Ghostscript interpreter.
|
int |
gsapi_run_string_with_length(com.sun.jna.Pointer instance,
String str,
int length,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
Send instruction to the Ghostscript interpreter.
|
int |
gsapi_run_string(com.sun.jna.Pointer instance,
String str,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
Send instruction to the Ghostscript interpreter.
|
int |
gsapi_set_display_callback(com.sun.jna.Pointer instance,
com.sun.jna.Structure callback)
Set the callback structure for the display device.
|
int |
gsapi_set_stdio(com.sun.jna.Pointer instance,
GhostscriptLibrary.stdin_fn stdin_fn,
GhostscriptLibrary.stdout_fn stdout_fn,
GhostscriptLibrary.stderr_fn stderr_fn)
Set the callback functions for stdio.
|
static final GhostscriptLibrary instance
int gsapi_revision(com.sun.jna.Structure pr,
int len)
pr - Pointer to the gsapi_revision_s that will hold return values.len - pr LengthGhostscriptLibrary.gsapi_revision_sint gsapi_new_instance(com.sun.jna.Pointer pinstance,
com.sun.jna.Pointer caller_handle)
pinstance - Pointer to gs_main_instance that will hold the
Ghostscript instance.caller_handle - Caller handler pointer (may be null).void gsapi_delete_instance(com.sun.jna.Pointer instance)
instance - Pointer to the Ghostscript instance.int gsapi_exit(com.sun.jna.Pointer instance)
instance - Pointer to the Ghostscript instance.int gsapi_init_with_args(com.sun.jna.Pointer instance,
int argc,
String[] argv)
instance - Pointer to the Ghostscript instance.argc - Argument countargv - Argument arrayint gsapi_run_string(com.sun.jna.Pointer instance,
String str,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
instance - Pointer to the Ghostscript instance.str - Instructions. Max length for the string is 65535.user_errors - If set to 0 errors are returned the normal way (to the
interpreter output), if a negative value is used errors are returns
directly by the function.pexit_code - Pointer to the exit return codeint gsapi_run_string_with_length(com.sun.jna.Pointer instance,
String str,
int length,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
instance - Pointer to the Ghostscript instance.str - Instructions. Max length for the string is 65535.length - str length.user_errors - If set to 0 errors are returned the normal way (to the
interpreter output), if a negative value is used errors are returns
directly by the function.pexit_code - Pointer to the exit return codeint gsapi_run_string_begin(com.sun.jna.Pointer instance,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
instance - Pointer to the Ghostscript instance.user_errors - If set to 0 errors are returned the normal way (to the
interpreter output), if a negative value is used errors are returns
directly by the function.pexit_code - Pointer to the exit return codeint gsapi_run_string_continue(com.sun.jna.Pointer instance,
String str,
int length,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
instance - Pointer to the Ghostscript instance.str - Instructions. Max length for the string is 65535.length - str length.user_errors - If set to 0 errors are returned the normal way (to the
interpreter output), if a negative value is used errors are returns
directly by the function.pexit_code - Pointer to the exit return codeint gsapi_run_string_end(com.sun.jna.Pointer instance,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
instance - Pointer to the Ghostscript instance.user_errors - If set to 0 errors are returned the normal way (to the
interpreter output), if a negative value is used errors are returns
directly by the function.pexit_code - Pointer to the exit return codeint gsapi_run_file(com.sun.jna.Pointer instance,
String file_name,
int user_errors,
com.sun.jna.ptr.IntByReference pexit_code)
instance - Pointer to the Ghostscript instance.file_name - File name.user_errors - If set to 0 errors are returned the normal way (to the
interpreter output), if a negative value is used errors are returns
directly by the function.pexit_code - int gsapi_set_stdio(com.sun.jna.Pointer instance,
GhostscriptLibrary.stdin_fn stdin_fn,
GhostscriptLibrary.stdout_fn stdout_fn,
GhostscriptLibrary.stderr_fn stderr_fn)
instance - Pointer to the Ghostscript instance.stdin_fn - Stdin callback function.stdout_fn - Stdout callback function.stderr_fn - Stderr callback function.int gsapi_set_display_callback(com.sun.jna.Pointer instance,
com.sun.jna.Structure callback)
instance - Pointer to the Ghostscript instance.callback - display_callback_s Structure holding display callback
functions.Copyright © 2016. All Rights Reserved.