beautypg.com

Avery Dennison 6037 Rev.AC 9/03 User Manual

Page 20

background image

5-2 Converting Applications

E d i t i n g t h e S o u r c e C o d e

You must change the 6035

printer application’s source code,

as described below.

To understand the source code changes to make, it may help to

study the samples provided with the SDK. The new code

samples are edited versions of the 6035 samples.

Remove Unneeded Memory Allocation

The 6037 and 6037

EX

printers do not need memory in DOS to

store fonts, formats, and graphics. Therefore, the call to pcl

I

nit

must have a NULL pointer as its parameter value. Following is

an example of how to change the code.

6035 Code

New Code

PRINTINIT rPRINTINIT;
int iStatus;

rPrintInit.lpuchFntAddr = 0;
rPrintInit.ulFntSize = 0;
iStatus = pc

l

Init(&rPrintInit);

int iStatus;

iStatus = pc

l

Init(NULL);

Remove Unnecessary Font Load Calls

It is unnecessary to load the standard fonts 1000-1013 in a 6037

and 6037

EX

printers. These fonts are not standard in the 6035

printer, so they have to be loaded separately. To decrease

6037 and 6037

EX

printers’ application load time, remove the

code that loads these fonts. You only need to load fonts that

are unique to your application.

For example, remove the following lines of code:

static unsigned char* pszFontFile = "1000boaf.pcl";
iStatus = pclOpen(pszFontFile);