Is there any specific reason for exporting the jrprint to text and then
printing it on dot matrix printer ?
There are APIs available in JasperPrintManager class for printing the
jrprint directly without exporting.
is it a web application and you want client side printing of the report
instead of server side printing.
I hope this helps.
Sent: Tuesday, May 09, 2006 4:23 PM
Subject: [jasperreports-questions] Japser Report - JRTextExporter issue
In our project we are using the JasperReports-1.2.0 . The requirement in
this project is such that a report can be used to generate the PDF , HTML ,
XLS or it can be used to print to a Laser printer or to the Dot Matrix
Now to print on the Dot Matrix printer I have used the JRTextExporter to
convert the .jrprint file into TXT file. But in the generated .Txt file the
printed area seems to be less & the data is truncated . I have specified the
pageWidth="842" & pageHeight="595" & orientation="Landscape" but I think
JRTextExporter is not using these values as the .txt output is generated in
half the size of that. If the same report is generated in the PDF format
the page size and the data populated comes to be fine on it .
I have tried changing the parameter setting of the JRTextExporter to
increase the size of the .txt file (JRTextExporterParameter.PAGE_HEIGHT and
the JRTextExporterParameter.PAGE_WIDTH ) but this doesn't seem to work.
I am attaching the output comparison of the Txt and PDF file .
Please guide me in resolving this difference of element positioning and page
size setting of .txt file.
Is this a known issue with JRTextFormatter , is there a workaround or patch
(Fix) for this available ?
Should I use any other approach to achieve the same?
Any suggestions and views are welcome.