HTMLPRINTER  2.13.5-1
Printing functions

Data Structures

struct  prtControlSeq
 

Typedefs

typedef void(* prtAsyncCallback) (void *data)
 

Enumerations

enum  PrtError {
  PRT_OK = 0, PRT_BUSY = -1, PRT_PAPERJAM = -2, PRT_HEADOPEN = -3,
  PRT_PAPEREND = -4, PRT_OVERHEAT = -5, PRT_OVERVOLTAGE = -6, PRT_UNDERVOLTAGE = -7,
  PRT_FAIL = -8, PRT_SCRIPT_ERROR = -9, PRT_NO_PRINTER = -10, PRT_UNSUPPORTED = -20,
  PRT_INVALID_PARAM = -21, PRT_NO_RESOURCE = -22, PRT_FILE_NOT_FOUND = -23, PRT_PROTOCOL = -24,
  PRT_FINAL_RESULT =- 40, PRT_TIMEOUT = -41
}
 List of general errors. More...
 
enum  PrtPropertyInt {
  PRT_PROP_STATE =0, PRT_PROP_HEAD_TEMP, PRT_PROP_HEAD_VOLTAGE, PRT_PROP_PIXEL_WIDTH,
  PRT_PROP_CONTRAST, PRT_PROP_DEFAULT_FONT_SIZE, PRT_PROP_PRINT_MODE
}
 List of numeric properties. More...
 
enum  PrtPropertyString {
  PRT_PROP_RESOURCE_PATH, PRT_PROP_FILE_PREFIX, PRT_PROP_DEFAULT_FONT, PRT_PROP_CSS,
  PRT_PROP_INIFILE, PRT_PROP_JS_ROOT, PRT_PROP_DEVICE
}
 List of string properties. More...
 

Functions

DllSpec const char * prt_GetVersion ()
 
DllSpec std::string prtFormat (const char *format,...)
 
DllSpec std::string prtFormatV (const char *format, va_list va)
 
DllSpec int prtGetFD ()
 
DllSpec int prtGetHtml (const std::map< std::string, std::string > &value, const std::string &text, std::string &html, bool full)
 
DllSpec int prtGetHtmlURL (const std::map< std::string, std::string > &value, const std::string &url, std::string &html, bool full)
 
DllSpec bool prtGetLocalProperties ()
 
DllSpec unsigned prtGetLogMask (void)
 
DllSpec int prtGetPropertyInt (enum PrtPropertyInt property, int *value)
 
DllSpec int prtGetPropertyString (enum PrtPropertyString property, char *value, int len)
 
DllSpec int prtGetPropertyString (enum PrtPropertyString property, std::string &value)
 
DllSpec std::string prtGetText (const std::string &name, const std::string &deflt="")
 
DllSpec enum PrtError prtHTML (const stringmap &value, const std::string &text, bool landscape=false)
 
enum PrtError prtHTML (const std::string &text, bool landscape=false)
 
enum PrtError prtHTML2PNG (const char *destfile, int width, const std::string &text, bool landscape=false)
 
enum PrtError prtHTML2PNG (const std::string &destfile, int width, const std::string &text, bool landscape=false)
 
DllSpec enum PrtError prtHTML2PNG (const char *destfile, int width, const stringmap &value, const std::string &text, bool landscape=false)
 
DllSpec enum PrtError prtHTML2Text (std::string &result, int width, const stringmap &value, const std::string &text, const prtControlSeq &ctrl)
 
enum PrtError prtHTML2Text (std::string &result, int width, const std::string &text, const prtControlSeq &ctrl)
 
enum PrtError prtHTMLAsync (const std::string &text, bool landscape=false, prtAsyncCallback cb=0, void *cbdata=0)
 
DllSpec enum PrtError prtHTMLAsync (const stringmap &value, const std::string &text, bool landscape=false, prtAsyncCallback cb=0, void *cbdata=0)
 
DllSpec const char * prtLibVersion ()
 
DllSpec std::string prtScriptError ()
 
DllSpec int prtSetCatalog (const std::string &filename)
 
DllSpec void prtSetLocalProperties (bool local)
 
DllSpec void prtSetLogMask (unsigned mask)
 
DllSpec int prtSetPropertyInt (enum PrtPropertyInt property, int value)
 
DllSpec int prtSetPropertyString (enum PrtPropertyString property, const char *value)
 
int prtSetPropertyString (enum PrtPropertyString property, const std::string &value)
 
DllSpec int prtSetRemotePrinter (const std::string &address)
 
enum PrtError prtURL (const std::string &url, bool landscape=false)
 
enum PrtError prtURL (const char *url, bool landscape=false)
 
enum PrtError prtURL (const stringmap &value, const std::string &url, bool landscape=false)
 
DllSpec enum PrtError prtURL (const stringmap &value, const char *url, bool landscape=false)
 
enum PrtError prtURL2PNG (const std::string &destfile, int width, const char *url, bool landscape=false)
 
enum PrtError prtURL2PNG (const std::string &destfile, int width, const stringmap &value, const char *url, bool landscape=false)
 
enum PrtError prtURL2PNG (const char *destfile, int width, const std::string &url, bool landscape=false)
 
enum PrtError prtURL2PNG (const char *destfile, int width, const char *url, bool landscape=false)
 
DllSpec enum PrtError prtURL2PNG (const char *destfile, int width, const stringmap &value, const char *url, bool landscape=false)
 
enum PrtError prtURL2PNG (const std::string &destfile, int width, const std::string &url, bool landscape=false)
 
enum PrtError prtURL2PNG (const char *destfile, int width, const stringmap &value, const std::string &url, bool landscape=false)
 
enum PrtError prtURL2PNG (const std::string &destfile, int width, const stringmap &value, const std::string &url, bool landscape=false)
 
enum PrtError prtURL2Text (std::string &result, int width, const char *url, const prtControlSeq &ctrl)
 
DllSpec enum PrtError prtURL2Text (std::string &result, int width, const stringmap &value, const char *url, const prtControlSeq &ctrl)
 
enum PrtError prtURL2Text (std::string &result, int width, const std::string &url, const prtControlSeq &ctrl)
 
enum PrtError prtURL2Text (std::string &result, int width, const stringmap &value, const std::string &url, const prtControlSeq &ctrl)
 
enum PrtError prtURLAsync (const stringmap &value, const std::string &url, bool landscape=false, prtAsyncCallback cb=0, void *cbdata=0)
 
enum PrtError prtURLAsync (const std::string &url, bool landscape=false, prtAsyncCallback cb=0, void *cbdata=0)
 
DllSpec enum PrtError prtURLAsync (const stringmap &value, const char *url, bool landscape=false, prtAsyncCallback cb=0, void *cbdata=0)
 
enum PrtError prtURLAsync (const char *url, bool landscape=false, prtAsyncCallback cb=0, void *cbdata=0)
 
DllSpec enum PrtError prtWait (int timeout_msec=-1)
 

Detailed Description


Data Structure Documentation

§ prtControlSeq

struct prtControlSeq

control sequences that will be used during conversion to text.

Note
These control sequences may contain 0-bytes!
Data Fields
string boldOff

deactivate bold printing

string boldOn

activate bold printing

string fontDoubleHeight

switch to double height font (activated with font-size:32, see HTMLPrinter users guide)

string fontDoubleWidth

switch to double width font (activated with font-size:40, see HTMLPrinter users guide)

string fontDoubleWidthHeight

switch to double width and height font (activated with font-size:48, see HTMLPrinter users guide)

string fontNormal

switch to normal (default) font (activated with font-size:24, see HTMLPrinter users guide)

string italicOff

deactivate italic printing

string italicOn

activate italic printing

string underlineOff

deactivate underline printing

string underlineOn

activate underline printing

Typedef Documentation

§ prtAsyncCallback

typedef void(* prtAsyncCallback) (void *data)

callback function that is called when printing has finished

Parameters
[in]datadata pointer provided by the application
Note
The callback will be run within a different thread context!

Enumeration Type Documentation

§ PrtError

enum PrtError

List of general errors.

Enumerator
PRT_OK 

no error

PRT_BUSY 

Printing in progress

PRT_PAPERJAM 

Paper jam

PRT_HEADOPEN 

Head open

PRT_PAPEREND 

Paper end

PRT_OVERHEAT 

Head too hot

PRT_OVERVOLTAGE 

Head over voltage

PRT_UNDERVOLTAGE 

Head under voltage

PRT_FAIL 

function failed (generic error)

PRT_SCRIPT_ERROR 

error during script processing, check prtScriptError() for more details

PRT_NO_PRINTER 

no printer available or file cannot be created in case of printing to a file

PRT_UNSUPPORTED 

function not supported on used hardware

PRT_INVALID_PARAM 

invalid parameters passed, e.g. NULL pointer for mandatory parameter

PRT_NO_RESOURCE 

resource could not be allocated

PRT_FILE_NOT_FOUND 

file not found

PRT_PROTOCOL 

protocol error when talking to the print service

PRT_FINAL_RESULT 

will never be returned, just used for determining if a result is a final result

PRT_TIMEOUT 

timeout in prtWait()

§ PrtPropertyInt

List of numeric properties.

Enumerator
PRT_PROP_STATE 

printer state (just using the subset of PrtError that reflects the state (read only)

PRT_PROP_HEAD_TEMP 

Head temperature value in degrees Celsius (read only)

Note
V/OS and Verix do not support reading the head temperature
PRT_PROP_HEAD_VOLTAGE 

Head voltage value in mV (read only)

PRT_PROP_PIXEL_WIDTH 

printer width in pixels (read only)

PRT_PROP_CONTRAST 

printer contrast 0...255

Note
Setting the contrast will only show some effect if the underlying system supports it. V/OS and VX820Duet do not support setting the contrast. On Verix old versions of the OS may fail setting the contrast. In this case the OS needs to be updated.
PRT_PROP_DEFAULT_FONT_SIZE 

Default font size

PRT_PROP_PRINT_MODE 

Preferred print mode: PRT_PREFER_GRAPHICS (default) or PRT_PREFER_TEXT, ignored if not supported by the printer

§ PrtPropertyString

List of string properties.

Enumerator
PRT_PROP_RESOURCE_PATH 

Resource path, default is resource/print

PRT_PROP_FILE_PREFIX 

prefix that is added in front of the URL in uiInvokeURL and to the template names, e.g. using "en/" would access the files in the subdirectory "en".

PRT_PROP_DEFAULT_FONT 

Default font name

PRT_PROP_CSS 

name of a CSS file

PRT_PROP_INIFILE 

name of the INI file, setting this property has the effect of reading and evaluating that file, i.e. the default font, font size and the CSS file name are updated

PRT_PROP_JS_ROOT 

Setting this path activates the JavaScript filesystem module. I/O is restricted to happen inside this path. Use "$APPDIR" to refer to this path from within JavaScript. Images and videos may also use "$APPDIR" to refer to files in this path.

PRT_PROP_DEVICE 

If not empty, printer device to be used on server side, e.g. /dev/ttyAMA0, not supported on all platforms, only devices that are accessibly by the printer server can be used

Function Documentation

§ prt_GetVersion()

DllSpec const char* prt_GetVersion ( )

returns a zero-terminated string with version and build information of libvfiguiprt in ADK version string format: <major>.<minor>.<patch>-<build>, e.g. "1.2.3-4"

Returns
version string

§ prtFormat()

DllSpec std::string prtFormat ( const char *  format,
  ... 
)

perform printf-like formatting.

Parameters
[in]formatprintf-like format string. It supports the commonly known format specifiers 's', 'i', 'd', 'u', 'o', 'x', 'X', 'p', 'c', 'f', 'e', 'g'. In addition the following format specifiers are supported:
  • 'S': format as string and substitute the special HTML characters '&', '<', '>', '"' and ''' by character references (e.g. '&', '<' ...).
  • 'C': format as character and sustitute HTML characters
Returns
formatted string

§ prtFormatV()

DllSpec std::string prtFormatV ( const char *  format,
va_list  va 
)

perfom printf-like formatting. This is the same as prtFormat() just taking a va_list instead of a variable number of arguments

§ prtGetFD()

DllSpec int prtGetFD ( )

obtain internal file descriptor for use in poll(). This may be used to check whether the result has been received from the print service.

Note
On Verix using select() or pipe_pending() on this file descriptor will not work, since the task that invokes prtGetFD() will not own the returned file descriptor. In order to check wheather result has been received from the print device, please use event notification that can be enabled with prtSetVerixNotification().
Returns
file descriptor or -1 in case no printing is active

§ prtGetHtml()

DllSpec int prtGetHtml ( const std::map< std::string, std::string > &  value,
const std::string &  text,
std::string &  html,
bool  full 
)

preprocess HTML code and return the resulting string

Parameters
[in]valuevalues used for insertions
[in]textstring containing an HTML fragment (i.e. the part between <body> and </body>).
[out]htmlresulting HTML code
[in]fulloptional parameter: If false or missing just substitute the XML processing instructions, if true in addition use inline images, insert CSS code and return full HTML document
Returns
error code (see PrtError)

§ prtGetHtmlURL()

DllSpec int prtGetHtmlURL ( const std::map< std::string, std::string > &  value,
const std::string &  url,
std::string &  html,
bool  full 
)

preprocess HTML code and return the resulting string

Parameters
[in]valuevalues used for insertions
[in]urllocation of the dialog file. The location is prefixed by the resource path and by the optional prefix (see also UI_PROP_RESOURCE_PATH, UI_PROP_FILE_PREFIX) unless an absolute path was provided.
[out]htmlresulting HTML code
[in]fulloptional parameter: If false or missing just substitute the XML processing instructions, if true in addition use inline images, insert CSS code and return full HTML document
Returns
error code (see PrtError)

§ prtGetLocalProperties()

DllSpec bool prtGetLocalProperties ( )
Returns
true if thread local properties are used, else return false

§ prtGetLogMask()

DllSpec unsigned prtGetLogMask ( void  )

Get log mask

Returns
current log mask

§ prtGetPropertyInt()

DllSpec int prtGetPropertyInt ( enum PrtPropertyInt  property,
int *  value 
)

get int property

Parameters
[in]propertyproperty to be set
[out]valuecurrent value
Returns
error code (see PrtError)

§ prtGetPropertyString() [1/2]

DllSpec int prtGetPropertyString ( enum PrtPropertyString  property,
char *  value,
int  len 
)

get string property

Parameters
[in]propertyproperty to be set
[out]valuecurrent value
[in]lensize ouf output buffer value in bytes
Returns
error code (see PrtError)

§ prtGetPropertyString() [2/2]

DllSpec int prtGetPropertyString ( enum PrtPropertyString  property,
std::string &  value 
)

get string property

Parameters
[in]propertyproperty to be set
[out]valuecurrent value
Returns
error code (see PrtError)

§ prtGetText()

DllSpec std::string prtGetText ( const std::string &  name,
const std::string &  deflt = "" 
)

lookup a text from current loaded catalog by key name. If text is not found in catalog or no catalog is loaded the function returns value in in parameter default.

Parameters
[in]nameof key used to lookup the text in calalog
[in]deflttext that is returned, if text is not found in calalog
Returns
text from catalog for success, else value in parameter default

§ prtHTML() [1/2]

DllSpec enum PrtError prtHTML ( const stringmap &  value,
const std::string &  text,
bool  landscape = false 
)

print an HTML document (synchronous)

Parameters
[in]valuename value pairs that are used as for variable substitutions.
[in]textstring containing an HTML fragment (i.e. the part between <body> and </body>).
[in]landscapeactivate landscape printing
Returns
error code (see PrtError)

§ prtHTML() [2/2]

enum PrtError prtHTML ( const std::string &  text,
bool  landscape = false 
)
inline

the same as prtHTML() just using an empty value map

§ prtHTML2PNG() [1/3]

enum PrtError prtHTML2PNG ( const char *  destfile,
int  width,
const std::string &  text,
bool  landscape = false 
)
inline

the same as prtHTML2PNG() just using an empty value map

§ prtHTML2PNG() [2/3]

enum PrtError prtHTML2PNG ( const std::string &  destfile,
int  width,
const std::string &  text,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for destfile

§ prtHTML2PNG() [3/3]

DllSpec enum PrtError prtHTML2PNG ( const char *  destfile,
int  width,
const stringmap &  value,
const std::string &  text,
bool  landscape = false 
)

render an HTML file to a PNG image

Parameters
[in]destfilename of the destination PNG file
[in]widthwidth of the image in pixels
[in]valuename value pairs that are used as for variable substitutions.
[in]textstring containing an HTML fragment (i.e. the part between <body> and </body>).
[in]landscapeactivate landscape printing (image is rotated by 90 degrees)
Returns
error code (see PrtError)

§ prtHTML2Text() [1/2]

DllSpec enum PrtError prtHTML2Text ( std::string &  result,
int  width,
const stringmap &  value,
const std::string &  text,
const prtControlSeq ctrl 
)

convert HTML document to text string. Custom control sequences can be passed that are inserted when switching the font size or style

Parameters
[out]resultresulting text string
[in]widthwidth of the image in printable characters
[in]valuename value pairs that are used as for variable substitutions.
[in]textstring containing an HTML fragment (i.e. the part between <body> and </body>).
[in]ctrlcontrol sequences
Returns
error code (see PrtError)

§ prtHTML2Text() [2/2]

enum PrtError prtHTML2Text ( std::string &  result,
int  width,
const std::string &  text,
const prtControlSeq ctrl 
)
inline

short cut with empty value map

§ prtHTMLAsync() [1/2]

enum PrtError prtHTMLAsync ( const std::string &  text,
bool  landscape = false,
prtAsyncCallback  cb = 0,
void *  cbdata = 0 
)
inline

the same as prtHTMLAsync() just using an empty value map

§ prtHTMLAsync() [2/2]

DllSpec enum PrtError prtHTMLAsync ( const stringmap &  value,
const std::string &  text,
bool  landscape = false,
prtAsyncCallback  cb = 0,
void *  cbdata = 0 
)

asynchronously start printing an HTML document, the result has to be obtained using prtWait().

Parameters
[in]valuename value pairs that are used as for variable substitutions.
[in]textstring containing an HTML fragment (i.e. the part between <body> and </body>).
[in]landscapeactivate landscape printing
[in]cboptional callback function that is called when printing has finished
[in]cbdatadata pointer that is passed on to the callback function
Returns
error code (see PrtError)
Note
If prtWait() is not called the next call to prtURLAsync() or prtHTMLAsync() will return PRT_BUSY.

§ prtLibVersion()

DllSpec const char* prtLibVersion ( )

read library version

Returns
version string

§ prtScriptError()

DllSpec std::string prtScriptError ( )
Returns
string containing information about errors that were reported during last script processing

§ prtSetCatalog()

DllSpec int prtSetCatalog ( const std::string &  filename)

load and set a catalog file containing name-value text pairs to be inserted with HTML placeholder <?text name?>. The current catalog is unloaded with filename=="" or by loading another catalog file.

Parameters
[in]filenameof the catalog, empty string to unload the current dialog
Returns
PRT_OK if file was successfully loaded, else error code (see PrtError)

§ prtSetLocalProperties()

DllSpec void prtSetLocalProperties ( bool  local)

de-/activate thread local properties for the current thread. Activating thread local properties initially copies the global properties to the current thread.

Parameters
[in]localif true activate thread local properties, if false discard them

§ prtSetLogMask()

DllSpec void prtSetLogMask ( unsigned  mask)

Set log mask

Parameters
[in]masklogging mask (see PRT_LOGMASK)

§ prtSetPropertyInt()

DllSpec int prtSetPropertyInt ( enum PrtPropertyInt  property,
int  value 
)

set int property

Parameters
[in]propertyproperty to be set
[in]valuenew value
Returns
error code (see PrtError)
Note
Properties are specific to each thread

§ prtSetPropertyString() [1/2]

DllSpec int prtSetPropertyString ( enum PrtPropertyString  property,
const char *  value 
)

set string property

Parameters
[in]propertyproperty to be set
[in]valuenew value
Returns
error code (see PrtError)
Note
Properties are specific to each thread

§ prtSetPropertyString() [2/2]

int prtSetPropertyString ( enum PrtPropertyString  property,
const std::string &  value 
)
inline

Overloaded function: Just using std::string for value

§ prtSetRemotePrinter()

DllSpec int prtSetRemotePrinter ( const std::string &  address)

set remote printer address

Parameters
[in]addressprinter address. This value overwrites the address set using the LPD environment variable. This may be used to set an IP address and port (e.g. ':0' would use the internal default printer). Using an empty string will revert to the default setting.
Returns
error code (see PrtError).

§ prtURL() [1/4]

enum PrtError prtURL ( const std::string &  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for url

§ prtURL() [2/4]

enum PrtError prtURL ( const char *  url,
bool  landscape = false 
)
inline

the same as prtURL() just using an empty value map

§ prtURL() [3/4]

enum PrtError prtURL ( const stringmap &  value,
const std::string &  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for url

§ prtURL() [4/4]

DllSpec enum PrtError prtURL ( const stringmap &  value,
const char *  url,
bool  landscape = false 
)

print an HTML file (synchronous)

Parameters
[in]valuename value pairs that are used as for variable substitutions.
[in]urllocation of the HTML file. The location is prefixed by the resource path and by the optional prefix (see also PRT_PROP_RESOURCE_PATH, PRT_PROP_FILE_PREFIX)
[in]landscapeactivate landscape printing
Returns
error code (see PrtError)

§ prtURL2PNG() [1/8]

enum PrtError prtURL2PNG ( const std::string &  destfile,
int  width,
const char *  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for destfile

§ prtURL2PNG() [2/8]

enum PrtError prtURL2PNG ( const std::string &  destfile,
int  width,
const stringmap &  value,
const char *  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for destfile

§ prtURL2PNG() [3/8]

enum PrtError prtURL2PNG ( const char *  destfile,
int  width,
const std::string &  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for url

§ prtURL2PNG() [4/8]

enum PrtError prtURL2PNG ( const char *  destfile,
int  width,
const char *  url,
bool  landscape = false 
)
inline

shortcut omitting value

§ prtURL2PNG() [5/8]

DllSpec enum PrtError prtURL2PNG ( const char *  destfile,
int  width,
const stringmap &  value,
const char *  url,
bool  landscape = false 
)

render an HTML file to a black and white PNG image

Parameters
[in]destfilename of the destination PNG file
[in]widthwidth of the image in pixels
[in]valuename value pairs that are used as for variable substitutions.
[in]urllocation of the HTML file. The location is prefixed by the resource path and by the optional prefix (see also PRT_PROP_RESOURCE_PATH, PRT_PROP_FILE_PREFIX)
[in]landscapeactivate landscape printing (image is rotated by 90 degrees)
Returns
error code (see PrtError)

§ prtURL2PNG() [6/8]

enum PrtError prtURL2PNG ( const std::string &  destfile,
int  width,
const std::string &  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for destfile and url

§ prtURL2PNG() [7/8]

enum PrtError prtURL2PNG ( const char *  destfile,
int  width,
const stringmap &  value,
const std::string &  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for url

§ prtURL2PNG() [8/8]

enum PrtError prtURL2PNG ( const std::string &  destfile,
int  width,
const stringmap &  value,
const std::string &  url,
bool  landscape = false 
)
inline

Overloaded function: Just using std::string for destfile and url

§ prtURL2Text() [1/4]

enum PrtError prtURL2Text ( std::string &  result,
int  width,
const char *  url,
const prtControlSeq ctrl 
)
inline

short cut with empty value map

§ prtURL2Text() [2/4]

DllSpec enum PrtError prtURL2Text ( std::string &  result,
int  width,
const stringmap &  value,
const char *  url,
const prtControlSeq ctrl 
)

convert HTML document to text string. Custom control sequences can be passed that are inserted when switching the font size or style

Parameters
[out]resultresulting text string
[in]widthwidth of the image in printable characters
[in]valuename value pairs that are used as for variable substitutions.
[in]urllocation of the HTML file. The location is prefixed by the resource path and by the optional prefix (see also PRT_PROP_RESOURCE_PATH, PRT_PROP_FILE_PREFIX)
[in]ctrlcontrol sequences
Returns
error code (see PrtError)

§ prtURL2Text() [3/4]

enum PrtError prtURL2Text ( std::string &  result,
int  width,
const std::string &  url,
const prtControlSeq ctrl 
)
inline

Overloaded function: Just using std::string for url

§ prtURL2Text() [4/4]

enum PrtError prtURL2Text ( std::string &  result,
int  width,
const stringmap &  value,
const std::string &  url,
const prtControlSeq ctrl 
)
inline

Overloaded function: Just using std::string for url

§ prtURLAsync() [1/4]

enum PrtError prtURLAsync ( const stringmap &  value,
const std::string &  url,
bool  landscape = false,
prtAsyncCallback  cb = 0,
void *  cbdata = 0 
)
inline

Overloaded function: Just using std::string for url

§ prtURLAsync() [2/4]

enum PrtError prtURLAsync ( const std::string &  url,
bool  landscape = false,
prtAsyncCallback  cb = 0,
void *  cbdata = 0 
)
inline

Overloaded function: Just using std::string for url

§ prtURLAsync() [3/4]

DllSpec enum PrtError prtURLAsync ( const stringmap &  value,
const char *  url,
bool  landscape = false,
prtAsyncCallback  cb = 0,
void *  cbdata = 0 
)

asynchronously start printing an HTML file, the result has to be obtained using prtWait().

Parameters
[in]valuename value pairs that are used as for variable substitutions.
[in]urllocation of the HTML file. The location is prefixed by the resource path and by the optional prefix (see also PRT_PROP_RESOURCE_PATH, PRT_PROP_FILE_PREFIX)
[in]landscapeactivate landscape printing
[in]cboptional callback function that is called when printing has finished
[in]cbdatadata pointer that is passed on to the callback function
Returns
error code (see PrtError)
Note
If prtWait() is not called the next call to prtURLAsync() or prtHTMLAsync() will return PRT_BUSY.

§ prtURLAsync() [4/4]

enum PrtError prtURLAsync ( const char *  url,
bool  landscape = false,
prtAsyncCallback  cb = 0,
void *  cbdata = 0 
)
inline

the same as prtURLAsync() just using an empty value map

§ prtWait()

DllSpec enum PrtError prtWait ( int  timeout_msec = -1)

wait for the printing to finish and return the error code

Parameters
[in]timeout_msectimeout in milliseconds, a negative value means infinite timeout
Returns
error code (see PrtError) or PRT_TIMEOUT in case the printing did not finish within the specified timeout.
Note
In case of timeout prtWait() has to be called again.