Support & Downloads

FAQ (Frequently Asked Questions): b-PAC

The following are answers to the most frequently asked questions we have received on b-PAC. Please refer to the following before sending us questions such as by email.

Operating environment, b-PAC versions

Q

Which of the 32 bit and 64 bit version b-PAC SDK should I use?

A

Use the b-PAC SDK version that matches the version of your printer, applications, and Windows OS.

Windows 32 bit
Use b-PAC SDK (32 bit version) and 32 bit applications with a printer supporting b-PAC SDK (32 bit version).

Windows 64 bit
Use b-PAC SDK (64 bit version) and 64 bit applications with a printer supporting b-PAC SDK (64 bit version), or use b-PAC SDK (32 bit version) and 32 bit applications with a printer supporting b-PAC SDK (32 bit version).

Windows 32 bit and 64 bit coexisting on the same computer
Use b-PAC SDK (32 bit version) and 32 bit applications with a printer supporting b-PAC SDK (32 bit version).

Note
Microsoft Office software also has 32 bit and 64 bit versions.

If you have installed b-PAC of a wrong version, uninstall b-PAC once and install the version that matches the version of your application.

  1. * The supported OS, supported editors and supported models vary by b-PAC version.
    See "b-PAC operating environment" for environment supported by each version.
Q

Is there any information useful for development?

A

Make use of the help files that are installed in addition to sample files written in major development languages.

Access the files from: Windows Start Menu -> All Programs -> Brother b-PAC3 SDK

Q

What are the new functions and features supported in b-PAC SDK Ver.3.0 and later versions?

A

Newly added functions

b-PAC is newly equipped with functions frequently requested by users, such as follows:

  • Printer status detecting function
  • Loaded tape-width detecting function
  • Print-completion event acquiring function
  • A function that allows the use of multiple fonts in a single text object

Keeping the conventional "simple installation"

  • b-PAC's highly valued "simple installation" feature is kept available. With a simple interface, you can create a program to print a label you want.
  • If you are not changing any features, you can migrate the conventional b-PAC version to b-PAC SDK Ver.3.0 or a later version just by uninstalling the previous version and installing b-PAC SDK Ver.3.0 or a later version. To use a new feature of b-PAC SDK Ver.3.0 or a later version, you may need to correct conventional sections depending on the methods used. In that case, you can refer to the code rewriting examples in the documents.
  • Since there is no change in frequently used methods such as Open(), Close(), GetText(), SetText() and SetBarcodeData(), you do not need to correct conventional sections even if new features of b-PAC SDK Ver.3. 0 or a later version are added.

What is more, the enhanced functions are available

  • An interface that allows easy programming in a program language commonly used today, such as C# and .NET, is added.
  • HTML Help format documentation improved contents and searchability. The document describes program rewriting examples for all methods, which is helpful when you add new features of b-PAC SDK Ver.3.0 or a later version to a program in previous version.
  • Practical samples are added so that customers can use them almost as they are just by making a slight change in contents.
Q

Which version should I use?

A

Please check the version in "b-PAC operating environment".

Note: b-PAC (64-bit) is not supported by all models.

To use b-PAC on a 64-bit version of Windows with a printer that does not support b-PAC (64-bit), combine the running 32-bit application with one of the following versions of b-PAC:
* b-PAC Ver.3.x (32-bit)
* b-PAC Ver.3.0 or lower (only 32-bit version is available)

For more information about combining 32-bit/64-bit b-PAC and applications, see the following related FAQs:
[Q] "Which of the 32 bit and 64 bit version b-PAC SDK should I use?"
[Q] "Which platform should I use to build an application in the Visual Studio development environment?"

Q

When I print using b-PAC, an error occurs ("Active X component can't create object" or "Automation Server can't create object").

A

Check if your application is compatible with the b-PAC version you are using (32 bit or 64 bit).
The compatibility of applications built with "Any CPU" may vary depending on the Windows version (32 bit or 64 bit). Make sure you select the compatible b-PAC version.

For more information, see the following related FAQs:
[Q] "Which of the 32 bit and 64 bit version b-PAC SDK should I use?"
[Q] "Which platform should I use to build an application in the Visual Studio development environment?"

Q

How can I upgrade from an old version to b-PAC SDK Ver.3.0 or a later version?

A

A version upgrade example

For example, if you are currently using the following:
OS: Windows Vista
b-PAC version: b-PAC SDK Ver.2.0.3

Case example / Action to b-PAC Installation of b-PAC SDK Ver.3.0 or later version Correction of b-PAC program
Case 1
Changing to Windows 7
Required Not required
Case 2
Using new features of b-PAC SDK Ver.3.0 or a later version
Required Required*1
  • *1 There is no need to change the previous parts when only the same methods as those used in the previous version are used. (Only the addition of new functional parts is needed.)
    Please refer to the table below for details.

List of methods used in b-PAC SDK Ver.2.0.3

The table below summarizes the precautions for applying the methods used in b-PAC SDK Ver.2.0.3 to b-PAC SDK Ver.3.0 and later versions. Basic methods that are frequently used are available as they are with b-PAC SDK Ver.3.0 and later versions.

Method name Change in b-PAC Ver.3.0 and later versions Precautions for using b-PAC b-PAC SDK Ver.3.0 and later versions
Open() Caution required When the printer is set with /D, use a new SetPrinter method.
Close() No -
Save() No -
Export() Caution required Format designating values are different.
GetSheetSize() Yes Change to the methods of parameters for each of the length, width and paper name.
GetTextCount() No -
GetTextIndex() No -
GetText() No -
GetFontInfo() Yes Change to the methods of parameters for each of the font name, text decoration and so on.
SetText() No -
SetFontInfo() Yes Change to the methods of parameters for each of the font name, text decoration and so on.
SetBarcodeData() No -
ReplaceImageFile() Yes Change to a new IObject::SetData method
DoPrint() No -
Q

b-PAC does not operate due to an error that occurred when it was called in the program using Excel or Access VBA.

A

Please check the following.

1) When 64 bit version Windows is in use
Choose a 32 bit or 64 bit version b-PAC that matches the version of your application.
Please see the following FAQs for details.
"Which of the 32 bit and 64 bit version b-PAC SDK should I use?"

2) Check if necessary library references are set for VBA.
Reference setting is required to use b-PAC with VBA.
References are preset in the attached sample file. If you are creating a new file, you need to select "Brother b-PAC 3.x Type Library" as a name of component to use. (The state with a check mark)

Q

Which platform should I use to build an application in the Visual Studio development environment?

A

b-PAC SDK is available in two versions, 32 bit and 64 bit versions. You need to select a version that matches the version of your application to use.
Use 32 bit version b-PAC SDK for 32 bit applications, and use 64 bit version b-PAC SDK for 64 bit applications. Select a platform that matches the built application version and the b-PAC version.

  • To run 32 bit applications, select "x86" as the development platform.
    Use the 32 bit b-PAC SDK for both 32 bit and 64 bit OS.
  • To run 64 bit applications, select "x64" as the development platform.
    Use the 64 bit version of b-PAC SDK and a 64 bit OS.
  • To run common applications in an environment where 32 bit and 64 bit operating systems coexist, select "x86" as the development platform.
    Use 32 bit applications and the 32 bit version of b-PAC SDK.
Q

Currently, I am using the software developed with b-PAC SDK Ver.1.5.6 (or Ver.2.0.3) for PT-9500pc. Is b-PAC SDK Ver.1.5.6 (or Ver.2.0.3) supported by successor products PT-9700PC and PT-9800PCN?

A

b-PAC SDK Ver.3.0 or a later version is needed for PT-9700PC and PT-9800PCN. Previous versions of b-PAC are not supported. Please upgrade to b-PAC SDK Ver.3.0 or a later version. See the following for how to upgrade the version.

Step1.
Install b-PAC SDK Ver.3.0 or a later version.
Install a client component of b-PAC SDK Ver.3.0 or a later version for a computer intended as a client computer.

Step2.
Change the selection of the printing destination target printer to PT-9700PC or PT-9800PCN.
There are two methods to do this. Choose either of the following methods to change the selection.

Method 1
Open a template file (*.lbl, *.lbx), change the printer to PT-9700PC or PT-9800PCN and save the file again.

Method 2
Designate PT-9700PC or PT-9800PCN using the /D option in the Open method. For example, designate as follows.
Open("C:¥Program Files¥Brother bPAC SDK¥Templates¥NamePlate1.lbl /DBrother PT-9700PC")

Q

Is Windows 7 supported?

A

b-PAC Ver. 3.0/3.1 supports Windows 7.

  1. *: b-PAC Ver.3.0/3.1 (32 bit version) is available for 32 bit applications on 32 bit OS.
  2. *: b-PAC Ver.3.0/3.1 (32 bit version) is available for 32 bit applications on 64 bit OS.
  3. *: b-PAC Ver.3.0/3.1 (32 bit version) is not available for 64 bit application on 64 bit OS.
  4. *: b-PAC Ver.3.1 (64 bit version) is available for 64 bit application on 64 bit OS.
Q

Which versions of b-PAC support a template file (.lbx) created with P-touch Editor5.0?

A

b-PAC SDK Ver.2.0 and later versions support the .lbx file.

Q

What do I need to install to develop a label printing system?

A

Besides a development environment, the b-PAC SDK, the printer driver for a Brother Label Printer and P-touch Editor are needed to be installed.

Q

When using a PT-2430PC with b-PAC, does its printer driver need to be installed?

A

To use the PT-2430PC with b-PAC, its printer driver needs to be installed on the PC and the switch behind the printer should be switched to [E].

Q

Is it possible to print with Delphi?

A

Although it has not been tested with Delphi, the b-PAC component is implemented as a COM component.
Delphi 5 and later versions can handle a COM automation object such as b-PAC.

<Programming example>
Using Test.lbl as a template file, change a text to 'Hello World!' and print it.

procedure TForm1.LabelPrintClick(Sender: TObject);
var
	V: Variant;
begin
	try
		V := CreateOleObject('BrssCom.Document');
	except
		ShowMessage('Could not start b-PAC component.');
	Exit;
end;

if (V.Open('C:¥Test¥Test.lbl') <> 0) then
	begin
		V.SetText(0. 'Hello World!');
		V.DoPrint(0, '0');
	end;

	V := Unassigned;
end;
Q

Can Macintosh or Unix computers be used with b-PAC?

A

No. Only computers running Windows can be used at this time. There are no plans at this time for developing b-PAC for use in other environments.

Q

Is it possible to print with Lotus Notes?

A

A b-PAC type of COM interface can be called up from LotusScript of Notes R5 or later. For details, please refer to the Lotus website.

Q

Can new functions from b-PAC3 be added to an older system using b-PAC2?

A

In order to use new functions provided with b-PAC Ver. 3.0/3.1, some methods from b-PAC Ver. 1.0 or 2.0 must be modified as b-PAC Ver. 3.0/3.1 methods. Refer to the replacement samples provided in the Help.

Q

How can I check the version of b-PAC?

A

For b-PAC Ver. 2.0.* and before, double clicking BrssCom.exe in C:¥Program Files¥Common Files¥Brother BrssCom.
From b-PAC Ver. 3.0/3.1, display [Properties] of the bPAC.dll in C:¥Program Files¥Common Files¥Brother¥bPAC.
When using b-PAC SDK (32 bit version) on a 64 bit OS, replace "C:¥Program Files" with "C:\Program Files (x86)".

Q

Is it possible to print from JAVA?

A

The b-PAC library for JAVA isn't provided.
If it is possible to call up a COM component from JAVA, b-PAC can theoretically be used from JAVA.
We cannot guarantee correct operation, but we have heard there are examples using middleware as a bridge between JAVA and COM.

Q

How can I print from web application?

A

Please check "PrintFromWebApplication" document.

Q

Can labels be printed from a web browser on Windows?

A
  • You can use b-PAC via Internet Explorer. Internet Explorer needs to be set up to enable ActiveX.
  • You can use b-PAC via Google Chrome™, Firefox, and Microsoft Edge by using Brother b-PAC Extension.
Q

Is a print completion event notified on PJ-773, PJ-763MFi, PJ-763 and PJ-723?

A

A print completion event is not notified when b-PAC SDK (32 bit version) Ver.3.1.004 and b-PAC SDK (64 bit) Ver.3.1.003 are used on PJ-773, 763MFi, 763 and 723.

Q

b-PAC does not operate due to an error that occurred when it was called in the program using VBScript.

A

Please check the following.

1) When 64 bit version Windows is in use
Choose a 32 bit or 64 bit version b-PAC that matches the version of your application.
Please see the following FAQs for details.
"Which of the 32 bit and 64 bit version b-PAC SDK should I use?"

2) To run VBScript with 32 bit application on 64 bit version Windows, please use wscript.exe (32 bit version).
Example)How to run VBScript (NamePrn.vbs) from command prompt
%systemroot%\syswow64\wscript.exe NamePrn.vbs

b-PAC specifications and known problems

Q

How do I print labels distributed to multiple printers? (Windows)

A

Do one of the following:
1) Create a template and set the target printer for each file.
2) Set the target printer in the b-PAC program.

Note
Make sure all the distributed printer drivers are installed on your computer with separate names (output destinations).

1) Create a template and set the target printer for each file. You can then print to the target printer by selecting its template.

2) Set the target printer using the "SetPrinter" method in the b-PAC program as follows:

a) Call the "Open" method in the program to select the printer set in the template.
b) Call the "SetPrinter" method to change the printer.

To list the available (installed) printer drivers, use the "GetInstalledPrinters" method in the b-PAC program.

For more information about the "SetPrinter" and "GetInstalledPrinters" methods, see the following help topics in the b-PAC SDK Help:
* bpac::IDocument::SetPrinter
* bpac::IPrinter::GetInstalledPrinters

You can access the b-PAC SDK Help files from:
Windows Start Menu > All Programs > Brother b-PAC3 SDK

Q

When multiple printer drivers have been installed, printing is not possible from any printer.

A

The label printer specified in the label template file may be different from the label printer that is actually connected.
Open the label template file in P-touch Editor, and then change the setting for the label printer to be used.
Make sure that the printer to be used for printing is connected and turned on.

Q

What should be done when changing from the currently used label printer to a different model?

A

Since the label template file contains information on the printer to be used, a label template file containing the new printer information must be prepared.

Install the printer driver for the new label printer to be used, open the label template file in P-touch Editor, and then select the new label printer driver.
Depending on the model to be used, the display area may be slightly different. Therefore, check the label layout, and then save it.

In addition, if the old label printer will no longer be used, we recommend deleting the printer driver.

Q

It is taking a long time to run Open().

A

With Open(), printer enumeration is performed internally.
At this time, if a printer with slow response is connected, for example, a printer on the network that is turned off, Open () will take a long time.

Q

The printed text is partially missing.

A

It is confirmed that a phenomenon that the printed text is missing exists on some computer models due to bug of the display driver. It is recommended to check the website of the display manufacturer and upgrade the display driver to the latest version. If the upgraded display driver is unavailable, the following method may be helpful to improve the phenomenon.

Lower the setting in Screen properties > Setup > Details > Troubleshooting > Hardware Accelerator (normally set to maximum) by one level.

Q

Is it possible to print from an application program on a server PC to a P-touch connected to a client PC?

A

Yes. Install the b-PAC and the printer driver on the PC where the print data is created.
When the print data is created on the server PC, the b-PAC should be installed on the client PC as well.

Q

Is it possible to print from a client PC to a P-touch connected to a server PC?

A

Yes. Install the b-PAC and the printer driver on the server PC.

Q

Can b-PAC print to multiple P-touch printers from one b-PAC object?

A

Yes. Each label template file has a printer information. When creating the template file with the P-touch Editor, make sure to select a printer to be used.
When connecting multiple PT-9500PCs, switch the USB ID switch to [1].

Q

Is it possible to use two different label printers with a single computer to create two kinds of label?

A

Yes. Install each printer driver and select each label printer with P-touch Editor to create a label template file.

Q

When a JPG file shown in a picture box is specified by ReplaceImageFile(), an "Exception (internal error of the application)" occurs.

A

In b-PAC SDK Ver.2.0 and earlier versions, a file is locked and file handling is disabled just by displaying an image file in the picture box.

This problem is solved in b-PAC SDK Ver.3.0.

Q

Operations are not performed correctly when a Date and Time object is included in a text object.

A

With P-touch Editor 5, Date and Time objects can be inserted into text objects; however, this cannot be processed with b-PAC.
When using Date and Time objects with b-PAC, arrange them in the label template file as a Date and Time object instead of including them in a text object.

Q

Is it possible to get the printer status information?

A

Yes. Use b-PAC Ver. 3.0/3.1. Refer to the help for the detailed explanation.
As for b-PAC Ver. 2.0.* or before, it is not possible to get printer status.

Q

Can the index order of the SetText() method be changed?

A

Yes. Open the label template file with P-touch Editor.
With P-touch Editor 5, all the objects in the template file are shown in order in the Show Order tab in Professional mode. Select an object which you want to change the order of and drag it to its new position.
With P-touch Editor 4.2 and former, select an object you want to change the order and change the order by using the Order function in the right click menu.

Q

When a JPG file shown in a picture box is specified by ReplaceImageFile(), an exception error occurs.

A

Use b-PAC Ver. 3.0/3.1.

Q

When to Input the Chinese or Japanese, it could not print out but can print in English?

A

Print the font used must support the corresponding language, such as Arial font does not support Chinese, print Chinese characters may be blank.
Actual printing will not become blank according to the different operating systems and the default font may have change.
If it is found the text blank, please try to set the font before you print.

b-PAC re-deployment

Q

How can I upgrade b-PAC on a client PC?

A

Install the provided Client Component Installer (CCI) on the client PC. Or create an installer using the merge module included in the b-PAC SDK and install it on the client PC.

Q

How can b-PAC be copied to a computer not in the development environment?

A

Download the client installer package from the b-PAC Download page. Components needed to run applications using b-PAC will be installed by the installer.
(Documents, samples, sample template files and others that are included in SDK are not copied. A P-touch driver must be correctly installed on the computer used.)

Q

When printing, the "Error 429: ActiveX component can't create object." error occurs.

A

Install the provided CCI and try printing. If printing is successful, the reason of this error is the lack of modules such as msxml4.dll or gdiplus.dll.
Download them from the pages below (make sure they are the latest versions), and copy them to the Windows system folder.
Windows 2000: both msxml4.dll and gdiplus.dll are needed.
Windows XP: msxml4.dll is needed.

Download:

MSXML4*

GDI+*

Make sure to copy them to the Windows system folder.
*: This link goes to the Web site of Microsoft.com

Q

An error occurs when printing is executed in an environment where installation is performed by an installer created using the redeployment merge module (bPAC3.msm).

A

It is because there are insufficient modules for the created installer.
Based on the version of your b-PAC, add the following merge modules and others provided by Microsoft to the installing project and re-create the installer.

* The following merge modules are normally stored in the Program Files folder of a computer installed with Visual Studio.
   e.g. C:¥Program Files (x86)¥Common Files¥Merge Modules¥

With b-PAC 3.0:
 - Visual C++ 8.0 MFC (Microsoft_VC80_MFC_x86.msm)   *Stored in Visual Studio 2005
 - Visual C++ 8.0 CRT (Microsoft_VC80_CRT_x86.msm)   *Stored in Visual Studio 2005
 - GDI+ and MSXML4 are required in some cases. Please see the following FAQ.
   [Q]"When printing, the "Error 429: ActiveX component can't create object." error occurs."

With b-PAC 3.2:
<32 bit version>
 - Visual C++ 14.0 MFC (Microsoft_VC140_MFC_x86.msm)  *Stored in Visual Studio 2015
 - Visual C++ 14.0 CRT (Microsoft_VC140_CRT_x86.msm)  *Stored in Visual Studio 2015
<64 bit version>
 - Visual C++ 14.0 MFC (Microsoft_VC140_MFC_x64.msm)  *Stored in Visual Studio 2015
 - Visual C++ 14.0 CRT (Microsoft_VC140_CRT_x64.msm)  *Stored in Visual Studio 2015
 - Visual C++ 11.0 CRT (Microsoft_VC110_CRT_x64.msm)  *Stored in Visual Studio 2012

Samples

Q

When running a sample included in the b-PAC SDK, I get  the error messages "The application can't start because api-ms-win-crt-heap-l1-1-0.dll is missing from your computer." and "Class not registered."

A

These error messages may appear when you are performing the following tasks: 

  • When running the VBNET/VCS sample included in the b-PAC SDK: the message "The application can't start because api-ms-win-crt-heap-l1-1-0.dll is missing from your computer." may appear.
  • When running the VC sample included in the b-PAC SDK: the message "Class not registered." may appear.
The possible cause is that the Windows OS component UniversalCRT(UCRT) is not installed in your PC.

Solution:
Go to the Windows Update page on your PC and check whether the following updates are listed:
KB2919442
KB2919355
KB2999226

If they are listed, install them in the following order: KB2919442 > KB2919355 > KB2999226

If they are not listed, install Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019.
Q

When running a sample included with the SDK, a media error occurs.

A

The tape size specified to be used with the sample may be different from the size of tape actually loaded into the label printer.
In P-touch Editor, open the label template file for the sample (normally, installed at C:¥Program Files¥Brother bPAC SDK¥Templates), and then change the tape size to the size of tape loaded in the label printer.

Q

Printing is not possible even when running a sample included with the SDK.

A

Check the following.

1) Before you print using b-PAC, make sure you can print from the standard software (P-touch Editor).
If you cannot print from P-touch Editor, check the printer driver settings and connection, and then try again. For more information about solving common printing issues, visit the Brother Solutions Center at support.brother.com.

2) (For Windows 64-bit users only) Choose b-PAC (32-bit) or b-PAC (64-bit) according to the version of your application. For more information, see the following related FAQs:
[Q] "Which of the 32 bit and 64 bit version b-PAC SDK should I use?"
[Q] "Which platform should I use to build an application in the Visual Studio development environment?"

3) Make sure the path of the label template file (.lbx file) is correct.
For example, in Excel VBA, the path
Const sPath = "C:\Program Files\Brother bPAC3 SDK\Templates\Asset1.lbx” included in the program needs to match an actual location where the template file (Asset1.lbx) is saved.

You may need to correct the path if:
- The location or name of the template file has changed.
- b-PAC (32-bit) is installed on a 64-bit version of Windows. In this case, change the part underlined below:
 [C:\Program Files (x86)\Brother bPAC3 SDK\Templates\Asset1.lbx].

Q

Pressing the Print button of the practical sample package does not start printing.

A

Please check the following.

  • The printer is connected and the power is turned on.
  • Open the sample label template file (.lbl or .lbx) in P-touch Editor and check the settings of tape size to use and the label printer. The tape size and the label printer name set in the sample label template must be the same as those actually set.

Methods

Q

Is it possible to retrieve the printer status or error information?

A

  • When using a printer via a USB connection, you can check the printer online status in b-PAC SDK Ver.3.0 and later versions.
    See the description in the following in Help of b-PAC 3.x SDK.
      "Sample Codes" -> "Printer Online Check"

    When using a printer via network connection (wired/wireless), you cannot check whether the printer is online or not.

  • See the description in the following in Help of b-PAC 3.x SDK for how to check the success or failure of the print request.
      "Sample Codes" -> "Print Completion Event Handling & Callback"

    For more information about printer errors, check the value of the "bpac::IPrinter::ErrorCode" property in the callback process of the printing completion event.
    For the description of specific error codes, see the Help of b-PAC 3.x SDK:
      "Troubleshooting" > "Understanding error codes that appear while debugging"

    When using the printer via network connection (wired or wireless), not all errors may be recorded. We recommend a USB connection.

    Regardless of the b-PAC version or program, you can use the status monitor on the client computer connected to the printer to check the printer's status. The status monitor is installed together with the printer driver.
    (Make sure you have selected "Enable bidirectional support" in the "port" tab in the printer driver.)

Q

How can I check the index order of text?

A

Open the label template file with P-touch Editor. With P-touch Editor 5.0, objects contained in the label template file are displayed in order in the "Display Order" tab on the right side of the Professional mode screen. The text displayed at the top is the one last entered, and its index becomes 0.
With P-touch Editor 4.2 and earlier versions, select Display menu > Text Box. Text objects contained in the label template file are displayed in order by pressing the <<Button>> button.

Q

Can the index order of text objects be changed?

A

Open the label template file with P-touch Editor. With P-touch Editor 5.0, objects contained in the label template file are displayed in order in the "Display Order" tab on the right side of the Professional mode screen. Select a text object you want to change the order of and drag it to any position to change the index of the text object.
With P-touch Editor 4.2 and earlier versions, select a text object you want to change the order of and change the order to a desired one by selecting [Order] in the right click menu.

Q

How can I hide the printer monitor?

A

Click Printer & Fax to display the label printer properties, and uncheck Enable Bi-Directional Support in the Port tab.

Q

Can I select any cut options other than "Auto cut" or combine some cut options when printing multiple labels?

A

For detailed information about cut options, see the b-PAC SDK Help:
1. Click Start > All Programs > Brother b-PAC3 SDK, and then click the help file you want.
2. In the help file, go to [APPENDIX] > [Printout samples and cut option combinations for each major device type].
3. Click your model from the model list. (The available cut options depend on the model.)

Cut options can be described either by an enumerator value that starts with "bpo" or by a numeric value, depending on your script language. Use the numeric value in VBScript.
Refer to the samples in the b-PAC help > [Sample Codes] > [Sample printout].

When combining multiple cut options, enter the enumerator values connected with the "Or" operator, or enter the result of the "Or" operation of the numeric value in the StartPrint command.

- Combining the "Half cut" and "Chain print" cut options allows you to cut labels manually after printing:
     enumerator value : bpoHalfCut Or bpoChainPrint
     numeric value : &H600

=== (In the case of VBA) ===
[* The previous part is omitted.]
ObjDoc.StartPrint ( "Document_xxxx", bpoHalfCut Or bpoChainPrint )
  [If there is a loop command, place the loop start command after StartPrint.]
ObjDoc.PrintOut ( 1, 0 )
  [If there is a loop command, place the loop end command between PrintOut and EndPrint.]  ObjDoc.EndPrint ( )
===
  * The second argument of the PrintOut command is "0" because it is null.

You can also specify other settings, such as the print resolution.
For more information, search for "PrintOptionConstants" in the b-PAC help.

Q

How can text in each line of the text object with a line break be replaced?

A

With the text object set as

aaa
bbb

use the SetText() method with aaa as Text 0 and bbb as Text 1. (The index figure varies by content of the label template created.)

Q

How can two labels be printed without space between them?

A

This could be possible by using a combination of a cut function on the label printer and the cut option of b-PAC.
Refer to the b-PAC Ver. 3.0/3.1 help "Printout samples and cut option combinations for each major device type" for detailed information.

Please see "b-PAC Download" for details.

Q

Can a preview of the printed label be displayed?

A

Yes. The Export method is available with the b-PAC component. With the Export method, a bitmap file of the specified resolution (dpi) can be generated in the specified folder.

With PT-9200DX, if a resolution of 360 dpi is specified, a bitmap image that is the same as the actual printout will be generated. The image cannot be previewed directly on the screen using the Export method; however, an image of the finished product can be checked before the label is printed.

For more details on using the Export method, refer to the b-PAC SDK documentation and the ¥Samples¥VBS¥VBS_NamePlate.html file that is available after installing b-PAC.

Q

How can an image be replaced with its aspect ratio maintained?

A

b-PAC SDK Ver.1.5.4 and later versions provide an option to maintain the aspect ratio.
With b-PAC SDK Ver.3.0, set "4" to the third parameter of IObject::SetData().
With b-PAC SDK Ver.2.0 and earlier versions, set "4" to the third parameter of ReplaceImageFile().

Q

How can I set the CODE128 barcode data that contains control codes such as FNC1?

A

With b-PAC SDK Ver.1.5.4 and later versions, the CODE128/EAN128 barcode data can be set to contain the control codes.
For example, write as follows to set data "1234"FNC1"567"FNC1.

ObjDoc.SetBarcodeData 0, "1234¥a567¥a" (in the case of using VBScript)

Or, with b-PAC SDK Ver.3.0, the control codes can also be set by entering a value "1234¥a567¥a" in the IObject::Text properties. (Set "¥¥a" such as for Microsoft Visual C++.)
The control codes are converted according to the following rules.

FNC1 "¥a"
FNC2 "¥b"
FNC3 "¥c"
FNC4 "¥d"

P-touch Editor

Q

How many digits of CODE128/EAN128 can be handled?

A

P-touch Editor 4.0, b-PAC SDK Ver.1.4 and later versions can handle up to 250 digits. Please download and use the latest version.
P-touch Editor 3.x can handle only up to 30 digits. To print data with more than 30 digits, you need to leave sufficient space on a template you create so that the barcode can fit into the space even when the number of data digits has increased.

Q

Can I change the barcode size?

A

Yes. You can change it with b-PAC SDK Ver.3.0.
For b-PAC SDK Ver.2.0 and earlier versions, you need to do the following.

For example, if you want to change the barcode size to 4 cm or 6 cm according to the intended use, it is convenient to create two types of template files, i.e. 4-cm and 6-cm barcode template files, beforehand and let the program use either of the two files. The barcode width is selectable only from 3 types (or 4 types depending on the resolution of P-touch Editor and P-touch), large, medium and small (and ultra-small), due to print precision constraints of P-touch.

Q

Can a label layout file (*.lbl) merged with a database in P-touch Editor be opened with the Open() method?

A

Since there is no database merging function in the b-PAC component, layout files merged with a database cannot be used as templates. The connection with a database must be performed within the user's program, not with b-PAC or the layout file.
You must create a new layout that is not merged with a database, and use it as a template.

The procedure for easily creating a layout that can be used as a template with b-PAC from an existing layout merged with a database is described as follows:

  1. 1. Use P-touch Editor to open the layout merged with a database.
  2. 2. From the File menu, select Database, then click Disconnect.
  3. 3. From the File menu, select Save As and save this template file newly.

As this layout is not merged with a database, it can be used as a template with b-PAC.

Q

Is it possible to make the printed label size changeable depending on the text length?

A

Yes. Make the label template file as follows.

< To be changeable depending on the number of lines of text >

Direction paper = vertical, text = horizontal
Tape length Auto
"Specifies how text is displayed" of the text object Long Text

If "Long Text" is selected, calling the SetText method repeatedly for the same object after the Open method fixes the tape length to the largest size. To solve this problem, call the Open method/Close method on each printing occasion though it is less efficient.

< To be changeable depending on the length of one line >

Direction paper = horizontal, text = horizontal
Tape length Auto
"Specifies how text is displayed" of the text object Automatic Length or Free Size
Q

Can I add an extra line of text to be added to a text object (i.e. add a return character)?

A

Specify Fixed Frame Size (Wrap) as the text layout of the text object. The overflowed characters are placed in the next line.
To enter a return character at a certain point, include a return character code in the text to be replaced.
Refer to the Asset1.xls, VBA sample program, included in b-PAC SDK Ver. 3.0.

Q

What are the different Merge Options settings for a text object?

A

Merge Options is a function that, depending on the label that you wish to create, specifies the area in which text is printed and either automatically enlarges or reduces the character size or uses a fixed character size.
As for detail, refer to the P-touch Editor Help.

Fixed Frame Size The size of the text object does not change as text is added or deleted. The text is enlarged or reduced so that all entered text is displayed.
Fixed Frame Size (Wrap) Text that is typed in is wrapped automatically. If there is not enough space for wraps, the size of all characters is reduced.
Long Text As text is added, the text frame is enlarged vertically.
Automatic As text is added, the text frame is enlarged horizontally.
Free Size The object frame is enlarged or reduced depending on whether text is added or removed.
Q

Is it possible to use Unicode text?

A

Yes. Use the label template file from P-touch Editor 5 with b-PAC Ver. 2.0 or later.

Download

For Developers

  • Choose from Purposes

    Label printing, printer setup and management information.

  • b-PAC

    Information on application development tools for Windows

  • Mobile SDK

    Information on application development tools for mobile terminals

  • Command Reference

    Information on control command reference for label printers and mobile printers

  • Versatile software

    Information on versatile software provided by Brother

  • Choose from Models

    Introduction of Brother tools applicable to your model

  • Video Library

    Videos showing how to use SDK and other information

  • Contact Us

    Fill out the contact us form if you have questions about Brother developer tool.