0

I am using JasperReport 3.7.1
I want to print report in plain text, which font can I use?

I would like to print the report on a dot matrix printer.
I need a font that is the same as 'Roman 12cpi';
because 'Roman 12cpi' is not supported in ireport 3.7.1.

mechanical_meat
  • 163,903
  • 24
  • 228
  • 223
Dhawal
  • 11
  • 1

2 Answers2

0

What exactly do you mean by 'plain-text'?

If you really mean plain text (.txt file, no images), than you should export your report using JRTextExporter or JRCsvExporter. In that case, it doesn't matter which font you use. (Note that JasperReports is a poor choice if you only need this kind of reports)

If you only want it to look like plain text, you can use other 'plain text looking' fonts, like 'Courier New'

yshalbar
  • 1,455
  • 1
  • 9
  • 23
0

JasperReports supports TrueType fonts and not the Windows "printer-only" fonts that are commonly supplied with dot matrix printer software, such as Roman 12cpi.

You'll have more luck exporting your report as pure text(as was suggested by yshalbar) and sending raw escape codes to the printer such as ones in ESC/P to change your font.

Also, take a look in this related question, for more guidance on printing to dot matrix printers.

Community
  • 1
  • 1
Camilo Díaz Repka
  • 4,805
  • 5
  • 43
  • 68