From c7cf233ed08b0b7933f1de56443c69993a2d9285 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Sat, 26 Jul 2008 08:21:22 +0000 Subject: [PATCH] [ 1981944 ] Report Loading Takes time --- base/src/org/adempiere/pdf/Document.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/base/src/org/adempiere/pdf/Document.java b/base/src/org/adempiere/pdf/Document.java index 35116e323e..13175e0253 100644 --- a/base/src/org/adempiere/pdf/Document.java +++ b/base/src/org/adempiere/pdf/Document.java @@ -37,6 +37,10 @@ import com.lowagie.text.pdf.PdfWriter; */ public class Document { + static { + FontFactory.registerDirectories(); + } + private static void writePDF(Pageable pageable, OutputStream output) { try { @@ -49,8 +53,7 @@ public class Document { document, output); writer.setPdfVersion(PdfWriter.VERSION_1_2); document.open(); - final DefaultFontMapper mapper = new DefaultFontMapper(); - FontFactory.registerDirectories(); + final DefaultFontMapper mapper = new DefaultFontMapper(); final float w = (float) pf.getWidth(); final float h = (float) pf.getHeight(); final PdfContentByte cb = writer.getDirectContent();