How It Works | Samples & Tips | FAQ | Developer Downloads | Support


Frequently Asked Questions / Programming

 
Frequently Asked Questions / Template design

 
Frequently Asked Questions / Operation

 
Programming

Is it possible to print using Java Script?

The b-PAC component is implemented as a COM component. However, Java Script, which uses Netscape Navigator as its host application, cannot be used since it cannot call up a COM component (or ActiveX).

Internet Explorer and the Windows Scripting Host support a script language called JScript, which is similar to Java Script. With JScript, a COM component can be called up.

Generally, Java Script runs with either Netscape Navigator or Internet Explorer as a host application; however, Jscript only runs with Internet Explorer.

There is a method where b-PAC is implemented so that it is called up from VB Script on ASP (Active Server Pages) Web servers that use IIS (Internet Information Server), and the Web server performs the processing without the client application (usually the Web browser) directly calling up the b-PAC component.

With this method, the b-PAC component can be used to print labels indirectly from Java Script.
top
 
 
Can Macintosh or Unix computers be used with b-PAC?

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.
top
 
 
Is it possible to print with Lotus Notes?

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.
top
 
 
How can two labels be printed without space between them?

The driver option setting (dwOption) is available with the DoPrint method. Since the Half cut and Auto cut functions can be controlled each time a label is printed, Half cut and Auto cut can be set to OFF using this option.
After all data is printed, the labels can be separated using scissors, allowing multiple labels to be printed without wasting extra blank tape.

The procedure for setting this option (which is not explained in the specifications) is described below.

By specifying a value other than "g0" for the first argument of DoPrint and by specifying a flag other than the standard value for the flag, neither a half cut nor an auto cut will be performed.

For example specify "&H10" with VB:
ObjDoc.DoPrint &H10, "0".

Since the labels will not be cut after the last one is printed, it will be necessary to press the Feed & Cut button on the P-touch printer after printing is complete.
top
 
 
Can a preview of the printed label be displayed?

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.
top
 
 
Can the index order of the SetText() method be changed?

Yes. The necessary steps are described in line 9 on the page 7 of the b-PAC interface document. Please refer to this description.
top
 
 
Template design

Can the size of the barcode be changed?

Yes. All settings set with P-touch Editor for objects (barcodes, text, etc.) in a label to be printed with b-PAC are saved with the label template file. In other words, all attributes that can be set with P-touch Editor can be printed with b-PAC.

For example, if you want to change the size of a barcode to 4 cm and 6 cm, it is easiest to create two files (one template for a 4 cm barcode and one for a 6 cm barcode) using P-touch Editor ahead of time, then use those two files with the program.

However, due to the influence on the P-touch printing accuracy, there are only three barcode width settings (Small, Medium, and Large) in P-touch Editor. In addition, the width of the barcode may be affected by the number of digits in the data. For example, with the P-touch 9200DX, a EAN8 barcode printed with a Small width is about 4 cm, whereas if it was set to a Large width, it will be 6 cm.

Extremely small or extremely large barcodes cannot be printed. In addition, only barcode data created with P-touch Editor can be replaced in b-PAC, and the protocol and size cannot be changed in the program.
top
 
 
Can a label layout file (*.lbl) merged with a database in P-touch Editor be opened with the Open() method?

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. Use P-touch Editor to open the layout merged with a database.
  2. From the [File] menu, select [New], then click [Layout] to create a new layout. At this time, specify an appropriate length and width for the label.
  3. Select the layout opened in step 1, and then click [Select All], then [Copy] on the [Edit] menu.
  4. Select the new layout created in step 2, and then click [Paste] on the [Edit] menu. If necessary, correct the text contents and the properties, and then save the file.
As this layout is not merged with a database, it can be used as a template with b-PAC.
top
 
 
Can I add an extra line of text be added to a text object (i.e. add a return character)?

With the current specifications of b-PAC, the number of lines in the text cannot be changed (in other words, return codes cannot be added or deleted). In addition, the automatic line feed function is not available in.b-PAC (or P-touch Editor).

As a work-around, prepare in advance a label template containing a text object with multiple text lines. Then, you can specify in the user's program the maximum number of characters per line of text, and then replace the text.

Otherwise, prepare multiple label templates for the required number of lines and use the appropriate one as necessary.
top
 
 
When I use the SetText() method to transfer data from a database application, why does the character size of the transferred data becomes smaller?

Depending on the character substitution (SetText method) with b-PAC, text is replaced with the font and size of the text object in the previously set template. At this time, if the number of characters is more than that in the template and the text does not fit within the specified region, the height-to-width ratio of the text specified in the template is maintained and the character size is decreased (This is slightly different than when the label is made with P-touch Editor).

If there is available space in the label template, perform the following to reduce the chance of the character size being changed:
  • When creating a template with P-touch Editor, display the Text Properties dialog box.
  • Set the Merge Options function to "Clip".
  • Enlarge the text object to the left and right (this enlarges the text region without changing the character size).
When text is inserted into the region for this text object in b-PAC, the font and character size specified for the template will be applied.

If the Merge Options function were set to "Fit", the character size will be adjusted so that the text fills the text region. With P-touch Editor, the "Auto" and the "Clip" settings work differently, but with b-PAC they are essentially the same.
top
 
 
What are the different Merge Options settings for a text object?

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.

With P-touch Editor, these settings are available on the Text Properties for the text object. However, the way that a label is created with P-touch Editor and the way that the text is replaced using the SetText() method in b-PAC and printed is different. These differences are explained as follows:

  P-touch Editor b-PAC
AUTO The character size of the text in the object is fixed, and the size of the text object is adjusted according to the size of the text. Both AUTO and CLIP work in the same way. If the number of characters increases and the text does not fit within the size of the corresponding text object in the template, the height-to-width ratio of the text specified in the template is maintained and the character size is decreased.
CLIP The size of the text object is fixed, and any text that exceeds that size is not displayed or printed.
FIT Depending on the size of the text object, the height of the characters is maintained while the width of the characters is adjusted automatically so that the text fits within the region. Exactly the same as with P-touch Editor
top
 
Operation

How can I add BrssCom.msm to the Windows installer project?

There are several methods for creating a Windows installer project that can register merge modules (*.msm); however, for users of Visual Basic 6.0 Professional and Enterprise edition, we will describe the method using Visual Studio 6.0 Installer, which is a free download.

Please note that this operation was based on the Microsoft.com website as of 14 May 2002, and therefore may have changed since. Visual Studio Installer Version 1.1 was the latest version available at that time.

Download
  • Go to the Microsoft downloads search page at "http://www.microsoft.com/downloads/search.asp".
  • Select "Keyword Search".
  • Choose "All Downloads" from the "Show Results for" drop down box.
  • Type in "Visual Studio Installer" in the search box, to download the application from the download site.
Operating procedure
Users of Visual Basic 6.0 can refer to the MSDN Library. There you should search for documents using the keyword "Visual Studio Installer". The Visual Studio Installer help contains detailed explanations on the registering method for type libraries and merge modules, such as those as supplied in the b-PAC SDK program redistribution.

For information on adding merge modules, in the Visual Installer help file, follow the path [Visual Studio Installer documents]-[Using Visual Studio Installer]-[Maintaining components, files and folders for installer projects]-[Adding merge modules to installer projects].

For more details on Visual Studio Installer, refer to the MSDN Library or contact Microsoft Corporation.
top
 
 
When the P-touch is shared on a network and printing is being performed from another computer on the network, is it possible to call up the printer on the network from b-PAC?

Shared use on a network is not formally supported, but if P-touch Editor is used, connections are carried out as shown below.
Client Print Server
9x -> 9X
9x -> W2K
W2K -> W2K

If printing is possible using this procedure (for example, directly from P-touch Editor 3), printing is also possible with b-PAC. On systems where many client computers are printing to a P-touch connected to the same shared computer, we recommend using the same name for printers that are added

When using P-touch Editor to create templates that can be used with b-PAC, select the desired printer connected to the network in the Printer Setup, click OK, and then save the template file. By doing this, even if a P-touch printer is temporarily connected to a local port, you can print to the P-touch connected to the network.

At this time, if multiple templates are used in one instance of the b-PAC object (BrssCom.Document), make sure that each template has the same output port specified. There is no problem if the Open() method is used only once in one b-PAC object instance, such as shown in the b-PAC samples.
top
 
 
Can b-PAC print to multiple P-touch printers/printer ports from one b-PAC object?

The printer driver specifications differ depending on the operating system.

With Windows NT or Windows 2000, two units cannot be controlled. However, with Windows 95, 98, 98SE, or Me, if the second P-touch printer is added with the Add Printer Wizard and assigned a different port, the two units will be recognized separately.

The operation with Windows 98 SE is described as follows:

The operation is performed with b-PAC, but since the printer name is saved with the template, printing separately to multiple P-touch 9200DX printers connected to different ports (e.g., 24 mm at PTCOM1 and 18 mm at PTCOM2) is possible when printing one copy of the label.

That is when one copy of the label is printed. Details about this point are explained below; however certain precautions must be taken when programming.

With a single b-PAC object instance, only the printer read first is valid if the printers are the exact same model, even though they may have different names. In other words, if a template to be printed at PTCOM1 is read first, the port for the same b-PAC object continues to be PTCOM1, even if a template to be printed at PTCOM2 was read next.

This description is for a combination of different serial connections; however, the same occurs with a combination of USB and serial connections.

In order to avoid this, either generate a b-PAC object for each output, or generate a b-PAC object for each port. Since a b-PAC object for each output can be generated with the samples provided with the b-PAC SDK, this can be performed easily.

The mechanism for printer selection when printing from P-touch Editor is the same as for b-PAC. If multiple copies of P-touch Editor are started up and files for separate ports are read, printing can be performed correctly; however, if one copy of P-touch Editor is started up and two files saved with different ports for the same model of printer are read, the template is only printed at the port first read.

This feature is particularly useful if you need to print regularly onto different colours, sizes or types of tapes; or if labels need to be printed in different departments.

For example, you may have three P-touch printers connected to a PC. One may be used for a 12mm white tape, another for a 24mm black tape and the third for a 24mm yellow tape. Your program simply sends the data to the correct P-touch printer depending on the type of label needed.

Or your program could print a shipping label in a warehouse and a parts identification label in a spare parts department.
top
 
 
Can a QRCODE (2D barcode) be printed?

QRCODE barcodes can be printed with P-touch Editor Version 3.0 and 3.1 but not with b-PAC. However, since b-PAC can replace image files, a file containing an image of the barcode can be created and used to print the barcode.

Depending on the size of the barcode and the software used to create the image file, there may be large differences in accuracy when the barcode is read by the barcode reader.

Therefore, it is the user's responsibility to check if barcodes printed in this way can be read correctly by a barcode scanner.
top