Skip to content

Commit 9c93176

Browse files
authored
Merge pull request #814 from bcgov/feature/GRAD2-3666
update pom for jaspersoft
2 parents e1cc47f + 91a44ea commit 9c93176

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

api/src/main/java/ca/bc/gov/educ/grad/report/dto/reports/jasper/impl/JasperReportImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public class JasperReportImpl {
5757

5858
private static final String CLASSNAME = JasperReportImpl.class.getName();
5959
private static final Logger LOG = Logger.getLogger(CLASSNAME);
60+
private static final String PDF_GLYPH_RENDERER_BLOCKS_PROPERTY =
61+
PdfReportConfiguration.PROPERTY_PREFIX_GLYPH_RENDERER_BLOCKS + "indigenous";
62+
private static final String PDF_GLYPH_RENDERER_BLOCKS =
63+
"COMBINING_DIACRITICAL_MARKS,IPA_EXTENSIONS,SPACING_MODIFIER_LETTERS,PHONETIC_EXTENSIONS";
6064

6165
/**
6266
* Controls scaling images written to the browser.
@@ -85,6 +89,9 @@ public ReportDocument export() throws IOException {
8589
//final JasperPrint print = format.equals(XML) ? createEmptyReport() : createFilledReport();
8690

8791
final JasperPrint print = createFilledReport();
92+
if (ReportFormat.PDF.equals(format)) {
93+
configurePdfGlyphRendering(print);
94+
}
8895

8996
switch (format) {
9097
case CSV:
@@ -183,6 +190,11 @@ private JasperPrint createEmptyReport() {
183190
return new JasperPrint();
184191
}
185192

193+
private void configurePdfGlyphRendering(final JasperPrint print) {
194+
print.setProperty(PDF_GLYPH_RENDERER_BLOCKS_PROPERTY, PDF_GLYPH_RENDERER_BLOCKS);
195+
print.setProperty(PdfReportConfiguration.PROPERTY_GLYPH_RENDERER_ADD_ACTUAL_TEXT, Boolean.TRUE.toString());
196+
}
197+
186198
/**
187199
* Fills the report using the parameters and JR data source.
188200
*
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
22
net.sf.jasperreports.extension.simple.font.families.ireportfamily1531324152650=fonts/fontsfamily.xml
3-
net.sf.jasperreports.export.pdf.glyph.renderer.blocks.indigenous=COMBINING_DIACRITICAL_MARKS,IPA_EXTENSIONS,SPACING_MODIFIER_LETTERS,PHONETIC_EXTENSIONS
4-
net.sf.jasperreports.export.pdf.glyph.renderer.add.actual.text=true

0 commit comments

Comments
 (0)