Skip to content

BRLMTemplateObjectReplacer

This class contains replacement info when you print template.

Overview

You use this object to replaces the text in an object of a P-touch Template, when you print installed P-touch Template.
You use this object with printTemplateWithKey:settings:replacers: in BRLMPrinterDriver.

Instance methods

initWithObjectName:value:encode:

Initialize replacer to Replaces the text in an object of a P-touch Template, specified by its object name.

Declaration

- (nonnull instancetype)initWithObjectName:(NSString * _Nonnull )name value:( NSString * _Nonnull )value encode:(BRLMTemplateObjectEncode)encode

Parameters

Name Type Description
name NSString * A target object name, which you want to replace, in P-touch Template
value NSString * A new value to set to the target object when you print
encode BRLMTemplateObjectEncode An encode of value

initWithObjectIndex:value:encode:

Initialize replacer to Replaces the text in an object of a P-touch Template, specified by its object number.

Declaration

- (nonnull instancetype)initWithObjectIndex:(NSUInteger)index value:( NSString * _Nonnull )value encode:(BRLMTemplateObjectEncode)encode

Parameters

Name Type Description
index NSUInteger A target object index, which you want to replace, in P-touch Template
value NSString * A new value to set to the target object when you print
encode BRLMTemplateObjectEncode An encode of value

Types

BRLMTemplateObjectEncode

Declaration

typedef NS_ENUM(NSUInteger, BRLMTemplateObjectEncode) {
    BRLMTemplateObjectEncode_UTF_8 = 0,         //for printer models with Japanese fonts
    BRLMTemplateObjectEncode_SHIFT_JIS = 1,     //for printer models with Chinese fonts
    BRLMTemplateObjectEncode_GB_18030_2000 = 2, //for all other printer models.
};