Last updated
Was this helpful?
Last updated
Was this helpful?
Welcome to the ngdesktoputils wiki! This wiki provides comprehensive documentation to using the ngdesktoputils web service. This service works with the NGDesktop Client as a bridge to execute client side calls from Servoy.
First import the service using one of the release or via Servoy's Web Package Manager.
//print a pdf document to default system's printer
plugins.ngdesktoputils.printPDF("/Users/admin/Documents/myZebraFile.pdf");
This will close the NGDesktop main application. Make sure to application.exit() first to also close the client before closing the desktop application.
Executes a command async, the server side call will not block on this call.
Params
This executes a command and returns the result of the stdout. This will also call reject when a error happens so the call will error out. (will not return correct). Try to use the async executeCommand if you do not want blocking io.
Params
Write the specified text to the system's clipboard.
Params
Return the system's clipboard as string.
Return whether application is running as NGDesktop or not.
Prints a pdf document specified by path. Optionally, specify printer or unix print options (lp command) or windows print options(SumatraPDF). Options are fully depending on operating system.
Params
Returns installed printers on local machine.
Returns default printer on local machine.
For available options on Unix like systems check you system's lp manual (man lp) For available Windows options check the "Printing options" of the command-line arguments for SumatraPDF:
program
string
Name of program to execute (i.e "cmd.exe")
Required
args
array
Array of arguments to pass to program
Optional
program
string
Name of program to execute (i.e "cmd.exe")
Required
args
array
Array of arguments to pass to program
Optional
text
string
Text to be written in the clipboard
Required
path
string
PDF to be printed
Required
options
string
Printer name or Unix options (lp command) or windows options (SumatraPDF)
Optional