#include <stdio.h>

 

 

#include <fcntl.h>

 

 

#define MONTH

"\202P\202P\214\216"

 

#define DAY1

"\202P\202U\223\372"

 

#define TILDE

"\201\140"

 

 

#define DAY2

"\202P\202V\223\372"

 

#define KANJITXT MONTH DAY1 TILDE MONTH DAY2

 

FILE *prn;

 

 

 

main()

 

 

 

{

 

 

 

int point_size=24;

 

 

prn = fopen("lpt1","wb");

/* open lpt1 for writing */

fprintf(prn,"\33%%-12345X");

/* send UEL to get to PJL */

fprintf(prn,"@PJL ENTER LANGUAGE=PCL\n");

/* Enter PCL */

fprintf(prn,"\33E");

/* Esc E to reset printer */

fprintf(prn,"\33&t31P");

/* text parsing = Shift-JIS */

fprintf(prn,"\33(19K");

/* symbol set = Win3.1J */

fprintf(prn,"\33&a270P");

/* print direction = 270 */

fprintf(prn,"\33*p500x1300Y");

/* set CAP position */

fprintf(prn,"\33(s1p%dv0s0b28752T",point_size); /* MS-Mincho */

fprintf(prn,"\33&c-1T");

/*

select vertical writing */

fprintf(prn, KANJITXT);

/*

print vertical text */

fprintf(prn,"\33*p500x%dY",1300-point_size*4); /* set CAP for

underline*/

/* draw underline */

fprintf(prn,"\33*c%da3b0P",300 * strlen(KANJITXT)/2 *

point_size/72);

 

fprintf(prn,"\f");

/* formfeed */

fprintf(prn,"\33%%-12345X");

/* send UEL to get to PJL */

}

 

Printer-Specific Differences 2-57