Java Code Examples for com.lowagie.text.pdf.BaseFont#IDENTITY_H
The following examples show how to use
com.lowagie.text.pdf.BaseFont#IDENTITY_H .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JasperReportsUtil.java From nextreports-server with Apache License 2.0 | 5 votes |
@SuppressWarnings("deprecation") private static byte[] getBytes(JRAbstractExporter exporter, ByteArrayOutputStream baos, JasperPrint jasperPrint) throws JRException { printNextReportsParameters(); // for csv delimiter //exporter.setParameter(JRCsvExporterParameter.FIELD_DELIMITER, ";"); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos); if (exporter instanceof JRPdfExporter) { exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, encoding); // create embedded pdf font (like in nextreports) if (embeddedFont != null) { HashMap<FontKey, PdfFont> fontMap = new HashMap<FontKey, PdfFont>(); FontKey key = new FontKey("Arial", false, false); PdfFont font = new PdfFont(embeddedFont, BaseFont.IDENTITY_H, true); fontMap.put(key, font); exporter.setParameter(JRPdfExporterParameter.FONT_MAP, fontMap); } } else { exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8"); } exporter.exportReport(); return baos.toByteArray(); }
Example 2
Source File: PDFAssessmentBean.java From sakai with Educational Community License v2.0 | 4 votes |
@Override public Font getFont(String fontname, String encoding, boolean embedded, float size, int style, Color color, boolean cached) { return super.getFont(defaultFontname, BaseFont.IDENTITY_H, embedded, size, style, color, cached); }
Example 3
Source File: PDFAssessmentBean.java From sakai with Educational Community License v2.0 | 4 votes |
@Override public Font getFont(String fontname, String encoding, boolean embedded, float size, int style, Color color, boolean cached) { return super.getFont(defaultFontname, BaseFont.IDENTITY_H, embedded, size, style, color, cached); }