#include <stdio.h> #include <fcntl.h>

#define KANJITXT "\225\127\226\173"

#define RUBYTXT "\202\320\202\345\202\244 \202\331\202\361 " FILE *prn;

main()

{

int point_size=72;

 

 

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");

/* EscE to reset printer */

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

/* text parsing = Shift-JIS */

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

/* symbol set = Win3.1J */

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

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

/*

set cursor position */

fprintf(prn,KANJITXT);

/*

print kanji characters */

fprintf(prn,"\33(s%dV",point_size/3); /*furigana point size */ fprintf(prn,"\33*p300x%dY",400-4*point_size);/*cursor position*/

fprintf(prn,RUBYTXT);

/* print ruby characters */

fprintf(prn,"\f");

/* formfeed */

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

/* send UEL to get to PJL */

}

Printer-Specific Differences 2-55