File BradyPrintSdkSettings.h

FileList > BradyPrintSdkSettings.h

Go to the source code of this file

Printer features, settings, and job settings for the Brady Desktop Print SDK. More...

  • #include "BradyPrintSdkCore.h"

Public Types

Type Name
enum JobSettingKey
Job setting keys for customizing print job settings.
enum PrinterFeature
Feature identifiers for checking printer model capabilities.
enum PrinterSettingKey
Printer setting keys for retrieving live state from the connected printer.

Public Functions

Type Name
BRADY_SDK_EXPORT BradySdkStatus CheckFeatureSupport (PrinterHandle printer, PrinterFeature feature, bool * isSupported)
Checks if the connected printer supports a specific feature.
BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingBool (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, bool * value)
Retrieves a boolean setting value for a specific print job.
BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingEnum (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, int * value)
Retrieves an enumerated setting value for a specific print job, identified by a key.
BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingInt (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, int * value)
Gets an integer setting value for a specific print job.
BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingString (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, char * valueBuffer, size_t bufferSize, size_t * bytesCopied)
Gets a print job setting string value for a specific print job.
BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingBool (PrinterHandle printer, PrinterSettingKey key, bool * value)
Retrieves a boolean setting value from the printer, identified by a key.
BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingEnum (PrinterHandle printer, PrinterSettingKey key, int * value)
Retrieves an enumerated setting value from the printer, identified by a key.
BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingInt (PrinterHandle printer, PrinterSettingKey key, int * value)
Retrieves an integer setting value from the printer, identified by a key.
BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingString (PrinterHandle printer, PrinterSettingKey key, char * valueBuffer, size_t bufferSize, size_t * bytesCopied)
Retrieves a setting value from the printer, identified by a key.
BRADY_SDK_EXPORT BradySdkStatus GetSupportedCutterModes (PrinterHandle printer, int * supportedModesMask)
Returns a bitmask indicating which CutterMode values are currently valid.
BRADY_SDK_EXPORT BradySdkStatus RefreshPrinterSettings (PrinterHandle printer)
Sends a bidi refresh request to the printer, and updates the cached printer settings with the response.
BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingBool (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, bool settingValue)
Sets a print job setting Boolean value for a specific print job.
BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingEnum (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, int settingValue)
Sets a print job setting enum value for a specific print job.
BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingInt (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, int settingValue)
Sets a print job setting integer value for a specific print job.
BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingString (PrinterHandle printer, PrintJobHandle jobHandle, JobSettingKey key, const char * settingValue)
Sets a print job setting string value for a specific print job.

Detailed Description

This header defines enums for printer features, printer setting keys, and job setting keys, along with the functions to query and set them.

Key Concepts: Features vs. Settings

The SDK distinguishes between two categories of printer information:

Printer Features (PrinterFeature / CheckFeatureSupport): Features represent static capabilities of the printer model and firmware. They answer the question: "Is this printer model capable of X?" Feature checks are resolved from the printer model and firmware version. For example, PRINTER_FEATURE_RFID_ENCODING indicates whether the i7500 model line has support for RFID encoding, regardless of whether the specific connected unit has RFID hardware installed.

Printer Settings (PrinterSettingKey / GetPrinterSetting*): Settings represent live, dynamic state queried from the connected printer via bidirectional (bidi) communication. They answer the question: "What is this specific printer's current state?" Settings require a connection and should be preceded by a call to RefreshPrinterSettings() to ensure up-to-date values. For example, PRINTER_SETTING_IS_RFID_CAPABLE reports whether the specific connected unit actually has RFID hardware present and enabled.

Relationship between Features and Settings: Some settings are gated by a corresponding feature. If a feature is not supported, attempting to read a gated setting will return BRADY_SDK_ERROR_FEATURE_NOT_SUPPORTED. The recommended workflow is: * Call CheckFeatureSupport() to verify the model supports the capability. * Call RefreshPrinterSettings() to fetch current device state. * Call GetPrinterSetting*() to read the live value.

See also: PrinterFeature

See also: PrinterSettingKey

See also: CheckFeatureSupport

See also: RefreshPrinterSettings

Public Types Documentation

enum JobSettingKey

Job setting keys for customizing print job settings.

enum JobSettingKey {
    JOB_SETTING_JOB_NAME,
    JOB_SETTING_NUMBER_OF_COPIES,
    JOB_SETTING_CUT_AFTER_SET_LENGTH,
    JOB_SETTING_PERF_AFTER_SET_LENGTH,
    JOB_SETTING_PAGE_ORIENTATION,
    JOB_SETTING_CUTTER_MODE,
    JOB_SETTING_MIRROR_PRINT,
    JOB_SETTING_APPEND_FILE_NAME_COUNTER,
    JOB_SETTING_ROTATE_180,
    JOB_SETTING_COLLATE
};

This enum defines keys for various print job settings that can be retrieved or set. A setting key must be passed into a function that corresponds with the key's type. For instance, to turn on mirror printing, pass JOB_SETTING_MIRROR_PRINT and true to the SetPrintJobSettingBool function.

Keys in this enum are organized by type. Note that the order of values in this enum may change in future SDK versions.

See also: GetPrintJobSettingString

See also: GetPrintJobSettingInt

See also: GetPrintJobSettingEnum

See also: GetPrintJobSettingBool

See also: SetPrintJobSettingString

See also: SetPrintJobSettingInt

See also: SetPrintJobSettingEnum

See also: SetPrintJobSettingBool


enum PrinterFeature

Feature identifiers for checking printer model capabilities.

enum PrinterFeature {
    PRINTER_FEATURE_CUT_OPTIONS = 0,
    PRINTER_FEATURE_CUT_AFTER_SET = 1,
    PRINTER_FEATURE_POST_PRINT_ACCESSORIES = 2,
    PRINTER_FEATURE_RFID_ENCODING = 3
};

Features represent what the printer model and its firmware are capable of. They are determined by the printer's model and firmware version. A feature being supported does NOT guarantee that the specific connected unit has the required hardware installed (e.g., a model may support RFID encoding, but a particular unit may lack the RFID encoder module).

Use CheckFeatureSupport() to query feature availability. Features gate access to related printer settings: if a feature is not supported, reading its gated settings will return BRADY_SDK_ERROR_FEATURE_NOT_SUPPORTED.

See also: CheckFeatureSupport

See also: PrinterSettingKey


enum PrinterSettingKey

Printer setting keys for retrieving live state from the connected printer.

enum PrinterSettingKey {
    PRINTER_SETTING_SERIAL_NUMBER,
    PRINTER_SETTING_FIRMWARE_VERSION,
    PRINTER_SETTING_SUPPLY_NAME,
    PRINTER_SETTING_X_DPI,
    PRINTER_SETTING_Y_DPI,
    PRINTER_SETTING_SUPPLY_REMAINING_PERCENT,
    PRINTER_SETTING_SUPPLY_Y_NUMBER,
    PRINTER_SETTING_SUPPLY_WIDTH,
    PRINTER_SETTING_SUPPLY_HEIGHT,
    PRINTER_SETTING_POST_PRINT_ACCESSORY,
    PRINTER_SETTING_SUPPLY_IS_CONTINUOUS,
    PRINTER_SETTING_SUPPLY_IS_VALID,
    PRINTER_SETTING_IS_RFID_CAPABLE,
    PRINTER_SETTING_SUPPLY_IS_RFID,
    PRINTER_SETTING_SUPPLY_IS_SMART
};

This enum defines keys for various printer settings that are queried from the connected printer. Unlike printer features, these settings reflect the real-time state of the specific connected device, including its installed hardware, loaded supply, and current configuration.

A setting key must be passed into a function that corresponds with the key's type. For instance, to retrieve the serial number of a printer, pass PRINTER_SETTING_SERIAL_NUMBER to the GetPrinterSettingString function.

Call RefreshPrinterSettings() before reading settings to ensure values are up to date.

Some settings are gated by a printer feature. If the corresponding feature is not supported by the printer model, reading the setting will return BRADY_SDK_ERROR_FEATURE_NOT_SUPPORTED.

Keys in this enum are organized by type. All keys are read-only. Note that the order of values in this enum may change in future SDK versions.

See also: RefreshPrinterSettings

See also: CheckFeatureSupport

See also: PrinterFeature

See also: GetPrinterSettingString

See also: GetPrinterSettingInt

See also: GetPrinterSettingEnum

See also: GetPrinterSettingBool


Public Functions Documentation

function CheckFeatureSupport

Checks if the connected printer supports a specific feature.

BRADY_SDK_EXPORT BradySdkStatus CheckFeatureSupport (
    PrinterHandle printer,
    PrinterFeature feature,
    bool * isSupported
) 

Parameters:

  • printer The handle to the connected printer instance.
  • feature The feature to check support for.
  • isSupported A pointer to a boolean that will receive the result. True if the feature is supported, false otherwise.

Returns:

BRADY_SDK_SUCCESS if the check was successful.

See also: PrinterFeature

See also: BradySdkStatus


function GetPrintJobSettingBool

Retrieves a boolean setting value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingBool (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    bool * value
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job from which the setting should be gotten.
  • key An enum value representing printer setting key.
  • value A pointer to a boolean that will receive the bool value.

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: JobSettingKey

See also: BradySdkStatus


function GetPrintJobSettingEnum

Retrieves an enumerated setting value for a specific print job, identified by a key.

BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingEnum (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    int * value
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job from which the setting should be gotten.
  • key An enum value representing job setting key.
  • value A pointer to an integer that will receive the enumerated value. Cast your enum variable to int before calling this function.

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: JobSettingKey

See also: BradySdkStatus


function GetPrintJobSettingInt

Gets an integer setting value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingInt (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    int * value
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job from which the setting should be gotten.
  • key An enum value representing the job setting key.
  • value A pointer to an integer that will receive the value.

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: JobSettingKey

See also: BradySdkStatus


function GetPrintJobSettingString

Gets a print job setting string value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus GetPrintJobSettingString (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    char * valueBuffer,
    size_t bufferSize,
    size_t * bytesCopied
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job from which the setting should be gotten.
  • key An enum value representing job setting key.
  • valueBuffer A buffer to store the retrieved string value.
  • bufferSize The total size of valueBuffer.
  • bytesCopied A pointer to a variable that will receive the number of bytes copied into the buffer (including null terminator).

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: JobSettingKey

See also: BradySdkStatus


function GetPrinterSettingBool

Retrieves a boolean setting value from the printer, identified by a key.

BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingBool (
    PrinterHandle printer,
    PrinterSettingKey key,
    bool * value
) 

Parameters:

  • printer The handle to the connected printer instance.
  • key An enum value representing printer setting key.
  • value A pointer to a boolean that will receive the bool value.

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: PrinterSettingKey

See also: BradySdkStatus


function GetPrinterSettingEnum

Retrieves an enumerated setting value from the printer, identified by a key.

BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingEnum (
    PrinterHandle printer,
    PrinterSettingKey key,
    int * value
) 

Parameters:

  • printer The handle to the connected printer instance.
  • key An enum value representing printer setting key.
  • value A pointer to an integer that will receive the enumerated value. Cast your enum variable to int before calling this function.

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: PrinterSettingKey

See also: BradySdkStatus


function GetPrinterSettingInt

Retrieves an integer setting value from the printer, identified by a key.

BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingInt (
    PrinterHandle printer,
    PrinterSettingKey key,
    int * value
) 

Parameters:

  • printer The handle to the connected printer instance.
  • key An enum value representing printer setting key.
  • value A pointer to an integer that will receive the value.

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: PrinterSettingKey

See also: BradySdkStatus


function GetPrinterSettingString

Retrieves a setting value from the printer, identified by a key.

BRADY_SDK_EXPORT BradySdkStatus GetPrinterSettingString (
    PrinterHandle printer,
    PrinterSettingKey key,
    char * valueBuffer,
    size_t bufferSize,
    size_t * bytesCopied
) 

Parameters:

  • printer The handle to the connected printer instance.
  • key An enum value representing printer setting key.
  • valueBuffer A buffer to store the retrieved string value.
  • bufferSize The total size of valueBuffer.
  • bytesCopied A pointer to a variable that will receive the number of bytes copied into the buffer (including null terminator).

Returns:

BRADY_SDK_SUCCESS if the setting was retrieved successfully.

See also: PrinterSettingKey

See also: BradySdkStatus


function GetSupportedCutterModes

Returns a bitmask indicating which CutterMode values are currently valid.

BRADY_SDK_EXPORT BradySdkStatus GetSupportedCutterModes (
    PrinterHandle printer,
    int * supportedModesMask
) 

Bit N is set if CutterMode value N is a valid option given the printer's feature support and the currently installed post-print accessory. The printer must be connected and settings should be refreshed via RefreshPrinterSettings before calling this function to ensure the post-print accessory state is up to date.

Parameters:

  • printer The handle to the connected printer instance.
  • supportedModesMask A pointer to an integer that will receive the bitmask.

Returns:

BRADY_SDK_SUCCESS if the query was successful.

See also: CutterMode

See also: RefreshPrinterSettings

See also: CheckFeatureSupport

See also: BradySdkStatus


function RefreshPrinterSettings

Sends a bidi refresh request to the printer, and updates the cached printer settings with the response.

BRADY_SDK_EXPORT BradySdkStatus RefreshPrinterSettings (
    PrinterHandle printer
) 

Parameters:

  • printer The handle to the printer instance.

Returns:

BRADY_SDK_SUCCESS if the refresh was successful.


function SetPrintJobSettingBool

Sets a print job setting Boolean value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingBool (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    bool settingValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job for which the setting should be set.
  • key The key identifying the setting to set.
  • settingValue A Boolean value to set for the specified key.

Returns:

BRADY_SDK_SUCCESS if the setting was set successfully.

See also: JobSettingKey

See also: BradySdkStatus


function SetPrintJobSettingEnum

Sets a print job setting enum value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingEnum (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    int settingValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job for which the setting should be set.
  • key The key identifying the setting to set.
  • settingValue An integer value representing the Enum value to set for the specified key. Cast your enum variable to int before calling this function.

Returns:

BRADY_SDK_SUCCESS if the setting was set successfully.

See also: JobSettingKey

See also: BradySdkStatus


function SetPrintJobSettingInt

Sets a print job setting integer value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingInt (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    int settingValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job for which the setting should be set.
  • key The key identifying the setting to set.
  • settingValue An integer value representing the value to set for the specified key.

Returns:

BRADY_SDK_SUCCESS if the setting was set successfully.

See also: JobSettingKey

See also: BradySdkStatus


function SetPrintJobSettingString

Sets a print job setting string value for a specific print job.

BRADY_SDK_EXPORT BradySdkStatus SetPrintJobSettingString (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    JobSettingKey key,
    const char * settingValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job for which the setting should be set.
  • key The key identifying the setting to set.
  • settingValue A UTF-8 encoded string containing the value to set for the specified key.

Returns:

BRADY_SDK_SUCCESS if the setting was set successfully.

See also: JobSettingKey

See also: BradySdkStatus



The documentation for this class was generated from the following file BradyPrintSdkSettings.h