Skip to main content

Application Development Kit (Version 4.7)


prt.h File Reference

Last updated: 17-Sep-2025
#include <stdarg.h>

#include "types.h"

#include <vector>
Include dependency graph for prt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct   prtControlSeq
struct   PrtErrorEntry

Namespaces

  vfihtml
  vfiprt

Macros

#define  DllSpec

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_BATTERY = -11,


  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   PrtMode { PRT_PREFER_GRAPHICS,
PRT_PREFER_TEXT
}
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,
PRT_PROP_JS_QUOTA_SIZE


}
  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,
PRT_PROP_JS_QUOTA_ROOT,


  PRT_PROP_CP_APP_DIR


}
  List of string properties. More...

Functions

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

Data Structure Documentation

◆ vfiprt::prtControlSeq

struct vfiprt::prtControlSeq

control sequences that will be used during conversion to text.

  
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

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo