#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 */ | |
/* 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 = | |
fprintf(prn,"\33(19K"); | /* symbol set = Win3.1J */ |
fprintf(prn,"\33(s1p%dv0s0b28752T",point_size); /*
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,RUBYTXT); | /* print ruby characters */ |
fprintf(prn,"\f"); | /* formfeed */ |
/* send UEL to get to PJL */ |
}