我有一个java代码在纸上打印一段,我想改变字符串的字体。
l_print_data = formatPrintDataNewFormat(l_print_data_format, l_arr, i+1,p_request.passwordType); //formatPrintDataNew(l_print_data_format, l_arr);formatPrintData(l_print_data_format, l_arr); version 1.7 change by Yogeshwar
InputStream is = new ByteArrayInputStream(l_print_data.getBytes("UTF-8"));
PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
DocPrintJob job = printer_service.createPrintJob();
Doc doc= new SimpleDoc(is, flavor, null);
PrintJobWatcher pjDone = new PrintJobWatcher(job);
job.print(doc, attributes);
pjDone.waitForDone();
is.close();
l_print_data是一个字符串,我想在纸上更改相同的字体到一个特别不同的类型。我如何实现这一目标?请帮助。