Go to the source code of this file.
Typedefs | |
| typedef struct BWIPP | BWIPP |
| A BWIPP context. | |
Functions | |
| BWIPP * | bwipp_load (void) |
| Load the BWIPP resources by searching for barcode.ps in default locations. | |
| BWIPP * | bwipp_load_from_file (const char *filename) |
| Load the BWIPP resources from a given resource file. | |
| void | bwipp_unload (BWIPP *ctx) |
| Unload the BWIPP resources. | |
| const char * | bwipp_get_version (BWIPP *ctx) |
| Provide the version of BWIPP that has been loaded. | |
| char * | bwipp_emit_required_resources (BWIPP *ctx, const char *name) |
| Provides the set of BWIPP resources required to generate a barcode of the specified type. | |
| char * | bwipp_emit_all_resources (BWIPP *ctx) |
| Provides the complete set of BWIPP resources. | |
| char * | bwipp_emit_exec (BWIPP *ctx, const char *barcode, const char *contents, const char *options) |
| Provide the PostScript code that invokes a barcode with given parameters. | |
| unsigned short | bwipp_list_families (BWIPP *ctx, char ***families) |
| List all known barcode families. | |
| char * | bwipp_list_families_as_string (BWIPP *ctx) |
| List all known barcode families as a comma seperated string. | |
| unsigned short | bwipp_list_family_members (BWIPP *ctx, char ***members, const char *family) |
| List all members of a given barcode family. | |
| char * | bwipp_list_family_members_as_string (BWIPP *ctx, const char *family) |
| List all members of a given barcode family as a comma seperated string. | |
| unsigned short | bwipp_list_properties (BWIPP *ctx, char ***properties, const char *barcode) |
| List all properties of a given barcode symbology. | |
| char * | bwipp_list_properties_as_string (BWIPP *ctx, const char *barcode) |
| List all properties of a given barcode symbology as a comma seperated string. | |
| const char * | bwipp_get_property (BWIPP *ctx, const char *barcode, const char *property) |
| Get the value of a given property of a given barcode symbology. | |
| void | bwipp_free (void *p) |
| Free memory belonging to a BWIPP provided allocation. | |
The basic workflow is to firstly initialise the library to obtain a BWIPP context by loading the BWIPP resources using either bwipp_load() or bwipp_load_from_file(). The context is provided as the first argument to all subsequent function calls. You can then query the available barcode families with bwipp_list_families() and list each family's members using bwipp_list_family_members() to obtain the list of all supported barcode symbologies. The available properties of each barcode symbology can be enumerated using bwipp_list_properties() and read with bwipp_get_property(). To create a PostScript document concatenate together your own PostScript prolog with the output of either bwipp_emit_required_resources() (minimal set of resources for a specific barcode symbology) or bwipp_emit_all_resources() and you own PostScript code interspersed with calls to bwipp_emit_exec() to render a barcode. Finally, all resources can be freed using bwipp_unload().
The library should be thread-safe provided that the calling code is limited to one thread per context until the resources for the context have finished loading.
| char* bwipp_emit_all_resources | ( | BWIPP * | ctx | ) |
Provides the complete set of BWIPP resources.
| ctx | BWIPP context. |
| char* bwipp_emit_exec | ( | BWIPP * | ctx, | |
| const char * | barcode, | |||
| const char * | contents, | |||
| const char * | options | |||
| ) |
Provide the PostScript code that invokes a barcode with given parameters.
| ctx | BWIPP context. | |
| barcode | The type of barcode. | |
| contents | The contents of the barcode. | |
| options | The formatting options for the barcode. |
| char* bwipp_emit_required_resources | ( | BWIPP * | ctx, | |
| const char * | name | |||
| ) |
Provides the set of BWIPP resources required to generate a barcode of the specified type.
| ctx | BWIPP context. | |
| name | Path to the barcode.ps resources file. |
| void bwipp_free | ( | void * | p | ) |
Free memory belonging to a BWIPP provided allocation.
| p | Pointer to memory to free. |
| const char* bwipp_get_property | ( | BWIPP * | ctx, | |
| const char * | barcode, | |||
| const char * | property | |||
| ) |
Get the value of a given property of a given barcode symbology.
| ctx | BWIPP context. | |
| barcode | The type of barcode symbology. | |
| property | The name of the property to query. |
| const char* bwipp_get_version | ( | BWIPP * | ctx | ) |
Provide the version of BWIPP that has been loaded.
| ctx | BWIPP context. |
| unsigned short bwipp_list_families | ( | BWIPP * | ctx, | |
| char *** | families | |||
| ) |
List all known barcode families.
| ctx | BWIPP context. | |
| families | Returns list of all barcode families by reference, which the caller should release with bwipp_free(). |
| char* bwipp_list_families_as_string | ( | BWIPP * | ctx | ) |
List all known barcode families as a comma seperated string.
| ctx | BWIPP context. |
| unsigned short bwipp_list_family_members | ( | BWIPP * | ctx, | |
| char *** | members, | |||
| const char * | family | |||
| ) |
List all members of a given barcode family.
| ctx | BWIPP context. | |
| members | Returns list of all barcode family members by reference, which the caller should release with bwipp_free(). | |
| family | The name of a barcode family. |
| char* bwipp_list_family_members_as_string | ( | BWIPP * | ctx, | |
| const char * | family | |||
| ) |
List all members of a given barcode family as a comma seperated string.
| ctx | BWIPP context. | |
| family | The name of a barcode family. |
| unsigned short bwipp_list_properties | ( | BWIPP * | ctx, | |
| char *** | properties, | |||
| const char * | barcode | |||
| ) |
List all properties of a given barcode symbology.
| ctx | BWIPP context. | |
| properties | Returns list of all barcode properties by reference, which the caller should release with bwipp_free(). | |
| barcode | The type of barcode symbology. |
| char* bwipp_list_properties_as_string | ( | BWIPP * | ctx, | |
| const char * | barcode | |||
| ) |
List all properties of a given barcode symbology as a comma seperated string.
| ctx | BWIPP context. | |
| barcode | The type of barcode symbology. |
| BWIPP* bwipp_load | ( | void | ) |
Load the BWIPP resources by searching for barcode.ps in default locations.
| BWIPP* bwipp_load_from_file | ( | const char * | filename | ) |
Load the BWIPP resources from a given resource file.
| filename | Path to the barcode.ps resources file. |
| void bwipp_unload | ( | BWIPP * | ctx | ) |
Unload the BWIPP resources.
| ctx | BWIPP context. |
1.5.6