# Advanced Printer Driver Sample Program

## Registering/Printing NV Graphics

Registers a stylized bitmap such as a shop logo in the NV memory (nonvolatile memory) of the TM printer and prints it at the top of receipts.

## Registering NV Graphics

Registers bitmap data in the NV memory of the TM printer with TM Flash Logo Setting Utility. This memory maintains data even after the printer power is turned off.
This sample program registers bitmap data in the NV Graphics 0 (Keycode: 48,48).

## Printing

Prints the bitmap data registered in NV Graphics 0, using "h" of control font.

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe

### .NET Environment

> In .NET environment, you cannot specify a control font in the TM printer directly.
> You need replace fonts. For details on how to replace fonts, see "Step1 Printing device font."

> > TrueTypeFont | Device Font Name
> > Arial | control

> With this sample program, NV graphic data is created in 1-point Arial, which is converted into a control device font to print NV graphics.

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> VB.NET | Source folder | .exe | .exe

Top

## Monitoring Status, Controlling Jobs

Monitors the printer status and cancels jobs when a paper end error occurs.

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe

### .NET Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C# | Source folder | .exe | .exe
> VB.NET | Source folder | .exe | .exe

Top

## Maintenance Counter

Obtains the maintenance counter such as the number of paper feeding lines or operating time, using BiGetCounter of Status API.
Some models do not support this function.
Use BiResetCounter to reset the maintenance counter.

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe

### .NET Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C# | Source folder | .exe | .exe
> VB.NET | Source folder | .exe | .exe

Top

## Changing Paper Loading Method

Changes the paper loading method from an application. For APD, go to [ Printing Preferences ]-[ Document Settings ]-[ Paper Source ] to set.

With this sample program, change the paper loading method in the same way as you do for the [Paper Source] settings.

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe
> VB6.0 | Source folder | .exe | --

### .NET Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C# | Source folder | .exe | .exe
> VB.NET | Source folder | .exe | .exe

Top

## Occupying Shared Printer

Occupies a shared printer, using Status API.
When the printer is used in multiple processes such as being used by more than one user, you can avoid conflict with other processes by controlling priorities.

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe

### .NET Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C# | Source folder | .exe | .exe
> VB.NET | Source folder | .exe | .exe

Top

## Monochrome/Multi-tone Switching

Image data is printed in multiple tone on the first page and text and barcode data is printed in monochrome on the second page.
This function is only for the TM-T88V.

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe

### .NET Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> VB.NET | Source folder | .exe | .exe

Top

## Forced Reset

Note:
This program will force the printer to reset even if printing is in progress, and the data being printed will be deleted.

A forced reset of the printer is performed from this program without closing the [Print Test Page].
If printing is not completed or an error is not obtained within 150 seconds after executing a print job,
this program displays a confirmation message and then performs a forced reset.

Use the following procedure to confirm this operation.

1. Start this program.
2. Open the Properties window for the printer, and execute [Print Test Page]. When printing starts, immediately disconnect the printer from the computer.
3. Wait approximately 90 seconds, and then connect the printer to the computer once again.
4. Check the printer queue in Windows.
   If the status is "Initializing", the [Print Test Page] operation has not been completed during this process. Proceed to the next step.
   If the status is "Ready", the [Print Test Page] operation has been performed. Start from Step 2 again.
5. Click the [Print] button in this program.
6. After 150 seconds, the message [Anomalous occurrence. Execute BiForceResetPrinter.] appears.
7. Select [Yes]. BiForceResetPrinter is executed, and the TM printer is reset. Then, printing is performed from this program.

Adjust the time (150,000ms for the sample program) as necessary according to the volume of data being printed.

Edited file

> Programming Language | Source | File name | Edited locations
> C++ | Source folder | PrintDlg.cpp | 1
> VB.NET | Source folder | Form1.vb | 1

### Win32 Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> C++ | Source folder | .exe | .exe

### .NET Environment

> Programming Language | Source | Executable file
> 32 bit | 64 bit
> VB.NET | Source folder | .exe | .exe

Top