Right-To-Left (RTL) Support Jasper Reports

This article includes the required steps to fix issues related to Right-to-Left (RTL) direction in generated PDF documents from Jasper Reports. Also, it includes the shaping the numbers into Arabic numbers.

  • Add IBM icu4j dependency to your project (it is required for ArabicShaping util class for shaping numbers into Arabic):
		<!-- https://mvnrepository.com/artifact/com.ibm.icu/icu4j -->
  • Add the following class to your project.
public class ReportsUtil{
	public static void fixArabicAlignmentAndNumbers(JasperPrint print) throws ArabicShapingException {
		List pages = print.getPages();
		ArabicShaping shaping=new ArabicShaping(ArabicShaping.DIGITS_EN2AN);
		for (JRPrintPage p: pages) {
			List elements = p.getElements();
			for (JRPrintElement element: elements) {
				if(element instanceof JRPrintText) {
					JRPrintText text = (JRPrintText) element;


  • Call the method on your jasperPrint instance directly after you call fillReport, like the following:
JasperPrint jprint = (JasperPrint) JasperFillManager.fillReport(inStream, paramters, connection);

Note: Be sure to format all date fields with  “dd/MM/yyyy” pattern, otherwise the dates will be flipped.