20 #ifndef _CUSTOMXMLPRINT__H_
21 #define _CUSTOMXMLPRINT__H_
26 #define CXP_FAILURE -1
30 #define CUSTOMXPLIB_WINAPI
32 #if defined(WINDOWS) || defined(WIN32)
36 # ifdef CUSTOMXPLIB_DLL
37 # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
38 # ifdef CUSTOMXPLIB_INTERNAL
39 # define CUSTOMXPEXTERN extern __declspec(dllexport)
41 # define CUSTOMXPEXTERN extern __declspec(dllimport)
49 #ifdef CUSTOMXPLIB_WINAPI
53 # define CUSTOMXPEXPORT WINAPI
58 #ifndef CUSTOMXPEXTERN
59 # define CUSTOMXPEXTERN extern
121 #define CUSTOM_XMLPRINT_SEPARATOR 0x1E
CUSTOMXPEXTERN char ** GetAvailablePrinters(int *len)
Get the list of all available printers in the system Notes: The returned pointer must be freed usi...
_CustomXmlPrintResult
Definition: CustomXmlPrint.h:65
@ CUSTOM_XMLPRINT_INVALID_ARGUMENT
Definition: CustomXmlPrint.h:78
@ CUSTOM_XMLPRINT_NOT_CONNECTED_ERROR
Definition: CustomXmlPrint.h:94
@ CUSTOM_XMLPRINT_SUCCESS
Definition: CustomXmlPrint.h:70
@ CUSTOM_XMLPRINT_INTERNAL_LIBRARY_ERROR
Definition: CustomXmlPrint.h:86
@ CUSTOM_XMLPRINT_NOT_VALID_PRINTER
Definition: CustomXmlPrint.h:82
@ CUSTOM_XMLPRINT_GENERIC_FAILURE
Definition: CustomXmlPrint.h:74
@ CUSTOM_XMLPRINT_SECURITY_ERROR
Definition: CustomXmlPrint.h:98
@ CUSTOM_XMLPRINT_LIBRARY_ERROR
Definition: CustomXmlPrint.h:90
CUSTOMXPEXTERN CustomXmlPrintResult ClearXmlObjArray(void *xmlPrintHandle)
Clear the list of tag/values created using FillXmlObjArray().
CUSTOMXPEXTERN CustomXmlPrintResult GetImageDataStreamFromXml(void *xmlPrintHandle, unsigned char **pbuffer, int *ibufferSize, int bEnableDithering)
Generate a data stream buffer, the buffer to send to the printer, from xml project file Notes: Thi...
_CustomPrintOrientation
Definition: CustomXmlPrint.h:103
@ CUSTOM_ORIENTATION_LANDSCAPE
Definition: CustomXmlPrint.h:111
@ CUSTOM_ORIENTATION_PORTRAIT
Definition: CustomXmlPrint.h:107
CUSTOMXPEXTERN CustomXmlPrintResult SetXmlTag(void *xmlPrintHandle, char *tag, char *value)
Superseded Function ( replaced by SetXmlObjectTag)
CUSTOMXPEXTERN CustomXmlPrintResult GetXmlObjectTag(void *xmlPrintHandle, char *tag, char *value, int valuesize)
Get the value of the element specified by tag (format Id.Property). In the xml file identify an ele...
CUSTOMXPEXTERN CustomXmlPrintResult GetXmlCheckCorrectParsing(void *xmlPrintHandle, char *info, int size)
Parse Xml project file performing a syntax/correctness check Notes: After a call to SetXmlFileName...
CUSTOMXPEXTERN CustomXmlPrintResult FreeXmlPrintHandle(void *xmlPrintHandle)
Free handle previously allocated Handle is returned by GetXmlPrintHandle() or GetXmlPrintHandleFromD...
CUSTOMXPEXTERN CustomXmlPrintResult SetMargins(void *xmlPrintHandle, int left, int top, int right, int bottom)
Set printer margins in hundred of an inch
CUSTOMXPEXTERN char ** GetPageSizeNames(void *xmlPrintHandle, int *len)
Get the list of page formats available for the printer Notes: The returned pointer must be freed u...
CUSTOMXPEXTERN CustomXmlPrintResult SetXmlObjectsFromParamFile(void *xmlPrintHandle, char *xmlParamFileName)
Create a list of tag/value using the supplied xml parameter file and apply it to the xml project file...
CUSTOMXPEXTERN CustomXmlPrintResult SetMarginsMM(void *xmlPrintHandle, int left, int top, int right, int bottom)
Set printer margins in hundred of a millimiter
CUSTOMXPEXTERN CustomXmlPrintResult SetPageSizeName(void *xmlPrintHandle, char *name)
Set page size by name
CUSTOMXPEXTERN void * GetXmlPrintHandle(char *printerName)
Get handle for the printer identified by its name Use this function to select the desired printer....
CUSTOMXPEXTERN CustomXmlPrintResult SetNumCopies(void *xmlPrintHandle, int copies)
Set the number of copies to be printed
CUSTOMXPEXTERN CustomXmlPrintResult FreeInfoPtrMemory(char **ptr, int len)
Free memory allocated by a previous API Notes: GetPageSizeNames() GetXmlAvailableFontList() GetAva...
CUSTOMXPEXTERN CustomXmlPrintResult FillXmlObjArray(void *xmlPrintHandle, int ticket_num, char *tag, char *value)
Set the value of the element specified by tag (format Id.Property) See SetXmlObjectTag() for more d...
CUSTOMXPEXTERN void * GetXmlPrintHandleFromDialog(void)
Get handle for the printer identified by its name, using QT dialog box Use this function to select th...
CUSTOMXPEXTERN CustomXmlPrintResult SetXmlObjectTag(void *xmlPrintHandle, char *tag, char *value)
Set the value of the element specified by tag (format Id.Property) In the xml file identify an elem...
CUSTOMXPEXTERN CustomXmlPrintResult SetXmlFileNameAndDirs(void *xmlPrintHandle, char *filename, char *imagesDir, char *fontsDir)
Set the name of the xml project file, "images" and "fonts" directories To be done as the first step,...
CUSTOMXPEXTERN CustomXmlPrintResult GetXmlObjectsFromParamFile(void *xmlPrintHandle, char *xmlParamFileName, char *tag, int tagsize, char *value, int valuesize)
Get the list of tag/value from the supplied xml parameter file. The parameter file must be in the fo...
CUSTOMXPEXTERN CustomXmlPrintResult SetPageSize(void *xmlPrintHandle, int width, int height)
Set page size in hundred of an inch
CUSTOMXPEXTERN CustomXmlPrintResult SetPageSizeMM(void *xmlPrintHandle, int width, int height)
Set page size in hundred of a millimiter
CUSTOMXPEXTERN CustomXmlPrintResult PrintImage(void *xmlPrintHandle, char *filename)
Print image from file
CUSTOMXPEXTERN CustomXmlPrintResult PrintXmlObjArray(void *xmlPrintHandle, int automaticPageSize)
Print xml project file as a multi page document Notes: This function is used to perform the render...
CUSTOMXPEXTERN CustomXmlPrintResult GetXmlObjectLink(void *xmlPrintHandle, char *tag, char *value, int valuesize)
Get the value of the element specified by "link" tag. Undocumented: internal use only
CUSTOMXPEXTERN CustomXmlPrintResult PrintXml(void *xmlPrintHandle, int automaticPageSize)
Print xml project file Notes: This function is used to perform the rendering of the xml project an...
CUSTOMXPEXTERN CustomXmlPrintResult SetXmlFileName(void *xmlPrintHandle, char *filename)
Set the name of the xml project file To be done as the first step, in order to load the project ins...
CUSTOMXPEXTERN CustomXmlPrintResult GetXmlFontProperty(void *xmlPrintHandle, char *name, int *isBoldAvailable, int *isItalicAvailable)
Get bold and italic properties for the font identified by fontname Notes: This function can be use...
CUSTOMXPEXTERN CustomXmlPrintResult SetOrientation(void *xmlPrintHandle, CustomPrintOrientation orientation)
Set print page orientation
CUSTOMXPEXTERN CustomXmlPrintResult SetEmbeddedFontKeepFlag(int enable)
Keep project embedded fonts for future reuse when library handler is released
CUSTOMXPEXTERN CustomXmlPrintResult SetCustomResolutionRounding(int enable)
Not documented, internal use only
enum _CustomXmlPrintResult CustomXmlPrintResult
Definition: CustomXmlPrint.h:100
CUSTOMXPEXTERN CustomXmlPrintResult SetXmlObjectLink(void *xmlPrintHandle, char *tag, char *value)
Set the value of the element specified by "link" tag. Undocumented: internal use only
enum _CustomPrintOrientation CustomPrintOrientation
Definition: CustomXmlPrint.h:113
CUSTOMXPEXTERN CustomXmlPrintResult GetLibraryApiVersion(char *info, int size)
Get the current library API version
CUSTOMXPEXTERN char ** GetXmlAvailableFontList(void *xmlPrintHandle, int *len)
Get the list of the fonts available in the system, together with the fonts included in the opened xml...