Public API for libpostscriptbarcode - a C library providing a functional interface to Barcode Writer in Pure PostScript.
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.
|
| BWIPP * | bwipp_load (void) |
| | Load the BWIPP resources by searching for barcode.ps in default locations. More...
|
| |
| BWIPP * | bwipp_load_from_file (const char *filename) |
| | Load the BWIPP resources from a given resource file. More...
|
| |
| void | bwipp_unload (BWIPP *ctx) |
| | Unload the BWIPP resources. More...
|
| |
| const char * | bwipp_get_version (BWIPP *ctx) |
| | Provide the version of BWIPP that has been loaded. More...
|
| |
| 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. More...
|
| |
| char * | bwipp_emit_all_resources (BWIPP *ctx) |
| | Provides the complete set of BWIPP resources. More...
|
| |
| 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. More...
|
| |
| unsigned short | bwipp_list_families (BWIPP *ctx, char ***families) |
| | List all known barcode families. More...
|
| |
| char * | bwipp_list_families_as_string (BWIPP *ctx) |
| | List all known barcode families as a comma seperated string. More...
|
| |
| unsigned short | bwipp_list_family_members (BWIPP *ctx, char ***members, const char *family) |
| | List all members of a given barcode family. More...
|
| |
| 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. More...
|
| |
| unsigned short | bwipp_list_properties (BWIPP *ctx, char ***properties, const char *barcode) |
| | List all properties of a given barcode symbology. More...
|
| |
| char * | bwipp_list_properties_as_string (BWIPP *ctx, const char *barcode) |
| | List all properties of a given barcode symbology as a comma seperated string. More...
|
| |
| 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. More...
|
| |
| void | bwipp_free (void *p) |
| | Free memory belonging to a BWIPP provided allocation. More...
|
| |